Skip to content

Commit 29b1c2a

Browse files
committed
write bytes
1 parent e6f5dfe commit 29b1c2a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

mx.graalpython/mx_graalpython.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def do_run_python(args, extra_vm_args=None, env=None, jdk=None, **kwargs):
119119

120120
dists = ['GRAALPYTHON', 'TRUFFLE_NFI', 'SULONG']
121121
env["PYTHONUSERBASE"] = mx_subst.path_substitutions.substitute("<path:PYTHON_USERBASE>")
122-
122+
123123
vm_args, graalpython_args = mx.extract_VM_args(args, useDoubleDash=True, defaultAllVMArgs=False)
124124
graalpython_args, additional_dists = _extract_graalpython_internal_options(graalpython_args)
125125
dists += additional_dists
@@ -323,7 +323,7 @@ def _graalpytest_root():
323323

324324
def run_python_unittests(python_binary, args=None, paths=None, aot_compatible=True, exclude=None):
325325
args = args or []
326-
args = ["--experimental-options=true",
326+
args = ["--experimental-options=true",
327327
"--python.CatchAllExceptions=true",
328328
mx_subst.path_substitutions.substitute("--python.CAPI=<path:com.oracle.graal.python.cext>"),
329329
] + args
@@ -504,7 +504,7 @@ def run_shared_lib_test(args=None):
504504
fd = name = progname = None
505505
try:
506506
fd, name = tempfile.mkstemp(suffix='.c')
507-
os.write(fd, """
507+
os.write(fd, b"""
508508
#include "stdio.h"
509509
#include "polyglot_api.h"
510510
@@ -611,7 +611,7 @@ def run_shared_lib_test(args=None):
611611
}
612612
return test_basic_python_function();
613613
}
614-
""" % ("1" if "sandboxed" in args else "0"))
614+
""" % (b"1" if "sandboxed" in args else b"0"))
615615
os.close(fd)
616616
progname = os.path.join(SUITE.dir, "graalpython-embedded-tool")
617617
mx.log("".join(["Running ", "'clang", "-I%s" % svm_lib_path, "-L%s" % svm_lib_path, name, "-o", progname, "-lpolyglot"]))

0 commit comments

Comments
 (0)