Skip to content

Commit

Permalink
Fix mx extensions and use shlex Python module instead of pipes remove…
Browse files Browse the repository at this point in the history
…d in Python 3.13

PullRequest: truffleruby/4382
  • Loading branch information
andrykonchin committed Oct 22, 2024
2 parents 44ded82 + 75eb4ed commit b359f4c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions mx.truffleruby/mx_truffleruby.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from __future__ import print_function

import os
import pipes
import shlex
from os.path import join, exists, basename
import re
import shutil
Expand Down Expand Up @@ -137,7 +137,7 @@ def clean(self, forBuild=False):

def contents(self, result):
classpath_deps = [dep for dep in self.subject.buildDependencies if isinstance(dep, mx.ClasspathDependency)]
jvm_args = [pipes.quote(arg) for arg in mx.get_runtime_jvm_args(classpath_deps)]
jvm_args = [shlex.quote(arg) for arg in mx.get_runtime_jvm_args(classpath_deps)]

debug_args = mx.java_debug_args()
jvm_args.extend(debug_args)
Expand Down
4 changes: 2 additions & 2 deletions mx.truffleruby/mx_truffleruby_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

import os
import json
import pipes
import shlex
import signal
import subprocess
import sys
Expand Down Expand Up @@ -39,7 +39,7 @@ def __init__(self, args):

def __enter__(self):
if mx._opts.verbose:
mx.log(' '.join(['(background)'] + [pipes.quote(arg) for arg in self.args]))
mx.log(' '.join(['(background)'] + [shlex.quote(arg) for arg in self.args]))
self.process = subprocess.Popen(self.args, start_new_session=True)
mx._addSubprocess(self.process, self.args)

Expand Down

0 comments on commit b359f4c

Please sign in to comment.