Skip to content

Commit 69d34c1

Browse files
author
rocky
committed
Graal handling tweaks
1 parent e3ab0e2 commit 69d34c1

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

admin-tools/pyenv-3.6-3.10-versions

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ if [[ $0 == ${BASH_SOURCE[0]} ]] ; then
55
echo "This script should be *sourced* rather than run directly through bash"
66
exit 1
77
fi
8-
# export PYVERSIONS='3.6 pypy3.6 3.7 pypy3.7 pyston-2.3.5 pypy3.8 graalpython-20.3.0 3.8 3.9 pypy3.9 3.9 pypy3.10 graalpy-24.0 3.10'
9-
export PYVERSIONS='3.6 pypy3.6 3.7 pypy3.7 pyston-2.3.5 pypy3.8 3.8 3.9 pypy3.9 3.9 pypy3.10 3.10'
8+
# export PYVERSIONS='3.6 pypy3.6 3.7 pypy3.7 pyston-2.3.5 pypy3.8 graalpython-20.3.0 3.8 graalpy-22 3.9 pypy3.9 3.9 pypy3.10 graalpy-24.0 3.10'
9+
export PYVERSIONS='3.6 pypy3.6 3.7 pypy3.7 pyston-2.3.5 pypy3.8 3.8 3.9 pypy3.9 3.9 pypy3.10 graalpy-23 3.10'

xdis/codetype/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,10 @@ def portableCodeType(version_triple=PYTHON_VERSION_TRIPLE, is_graal=IS_GRAAL):
292292
return Code38
293293
elif version_triple[:2] == (3, 10) or IS_PYPY and version_triple[:2] == (3, 11):
294294
# 3.10
295-
return Code310
295+
if is_graal:
296+
return Code310Graal
297+
else:
298+
return Code310
296299
elif version_triple[:2] >= (3, 11):
297300
# 3.11 ...
298301
if is_graal:

xdis/codetype/code310graal.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,6 @@ def __init__(
127127
self.check()
128128

129129
def to_native(self) -> CodeType:
130-
if not (PYTHON_VERSION_TRIPLE >= (3, 11)):
131-
raise TypeError(
132-
"Python Interpreter needs to be in 3.11 or greater; is %s"
133-
% version_tuple_to_str()
134-
)
135-
136130
code = deepcopy(self)
137131
code.freeze()
138132
try:

0 commit comments

Comments
 (0)