Skip to content

Commit 3469ced

Browse files
committed
[GR-21590] Update Python imports.
PullRequest: graalpython/3317
2 parents 662fd20 + a2a73f3 commit 3469ced

File tree

3 files changed

+16
-10
lines changed

3 files changed

+16
-10
lines changed

ci.jsonnet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{ "overlay": "ee6848c16e00a4b50f4e377ee3e3c941f67662d0" }
1+
{ "overlay": "6d170b8abc2a32d4754de9fd3f9a42d2fc50b326" }

mx.graalpython/mx_graalpython.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -824,7 +824,12 @@ def find_eclipse():
824824
def set_env(**environ):
825825
"""Temporarily set the process environment variables"""
826826
old_environ = dict(os.environ)
827-
os.environ.update(environ)
827+
for k, v in environ.items():
828+
if v is None:
829+
if k in os.environ:
830+
del os.environ[k]
831+
else:
832+
os.environ[k] = v
828833
try:
829834
yield
830835
finally:
@@ -1553,10 +1558,11 @@ def graalpython_gate_runner(args, tasks):
15531558

15541559
with Task('GraalPython GraalVM build', tasks, tags=[GraalPythonTags.svm, GraalPythonTags.graalvm], report=True) as task:
15551560
if task:
1556-
svm_image = python_svm()
1557-
benchmark = os.path.join(PATH_MESO, "image-magix.py")
1558-
out = mx.OutputCapture()
1559-
mx.run([svm_image, "-v", "-S", "--log.python.level=FINEST", benchmark], nonZeroIsFatal=True, out=mx.TeeOutputCapture(out), err=mx.TeeOutputCapture(out))
1561+
with set_env(PYTHONIOENCODING=None):
1562+
svm_image = python_svm()
1563+
benchmark = os.path.join(PATH_MESO, "image-magix.py")
1564+
out = mx.OutputCapture()
1565+
mx.run([svm_image, "-v", "-S", "--log.python.level=FINEST", benchmark], nonZeroIsFatal=True, out=mx.TeeOutputCapture(out), err=mx.TeeOutputCapture(out))
15601566
success = "\n".join([
15611567
"[0, 0, 0, 0, 0, 0, 10, 10, 10, 0, 0, 10, 3, 10, 0, 0, 10, 10, 10, 0, 0, 0, 0, 0, 0]",
15621568
])

mx.graalpython/suite.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,31 +45,31 @@
4545
},
4646
{
4747
"name": "sdk",
48-
"version": "d719a133492c71209ded8121341ffdabdc2b8b66",
48+
"version": "45b93388796aff34c6362c3d6607fdaef3b47468",
4949
"subdir": True,
5050
"urls": [
5151
{"url": "https://github.com/oracle/graal", "kind": "git"},
5252
]
5353
},
5454
{
5555
"name": "tools",
56-
"version": "d719a133492c71209ded8121341ffdabdc2b8b66",
56+
"version": "45b93388796aff34c6362c3d6607fdaef3b47468",
5757
"subdir": True,
5858
"urls": [
5959
{"url": "https://github.com/oracle/graal", "kind": "git"},
6060
],
6161
},
6262
{
6363
"name": "sulong",
64-
"version": "d719a133492c71209ded8121341ffdabdc2b8b66",
64+
"version": "45b93388796aff34c6362c3d6607fdaef3b47468",
6565
"subdir": True,
6666
"urls": [
6767
{"url": "https://github.com/oracle/graal", "kind": "git"},
6868
]
6969
},
7070
{
7171
"name": "regex",
72-
"version": "d719a133492c71209ded8121341ffdabdc2b8b66",
72+
"version": "45b93388796aff34c6362c3d6607fdaef3b47468",
7373
"subdir": True,
7474
"urls": [
7575
{"url": "https://github.com/oracle/graal", "kind": "git"},

0 commit comments

Comments
 (0)