Merge branch 'python-3.3-to-3.5' into python-2.4

This commit is contained in:
rocky
2021-10-29 22:32:01 -04:00
9 changed files with 21 additions and 27 deletions

View File

@@ -115,10 +115,11 @@ class Scanner(object):
self.is_pypy = is_pypy
if version[:2] in PYTHON_VERSIONS:
v_str = "opcode_%s" % version_tuple_to_str(
version, start=0, end=2, delimiter=""
)
if is_pypy:
v_str = "opcode_%spypy" % ("".join([str(v) for v in version]))
else:
v_str = "opcode_%s" % ("".join([str(v) for v in version]))
v_str += "pypy"
exec("from xdis.opcodes import %s" % v_str)
exec("self.opc = %s" % v_str)
else:
@@ -548,7 +549,7 @@ def get_scanner(version, is_pypy=False, show_asm=None):
# Pick up appropriate scanner
if version[:2] in PYTHON_VERSIONS:
v_str = "".join([str(v) for v in version[:2]])
v_str = version_tuple_to_str(version, start=0, end=2, delimiter="")
try:
import importlib