diff --git a/uncompyle6/bin/uncompile.py b/uncompyle6/bin/uncompile.py index 6266ecd9..2c21a011 100755 --- a/uncompyle6/bin/uncompile.py +++ b/uncompyle6/bin/uncompile.py @@ -74,9 +74,9 @@ def main_bin(): if not (sys.version_info[0:2] in ((2, 6), (2, 7), (3, 0), (3, 1), (3, 2), (3, 3), (3, 4), (3, 5), (3, 6), - (3, 7), (3, 8) + (3, 7), (3, 8), (3, 9), (3, 10) )): - print('Error: %s requires Python 2.6-3.8' % program, + print('Error: %s requires Python 2.4-3.10' % program, file=sys.stderr) sys.exit(-1) diff --git a/uncompyle6/parser.py b/uncompyle6/parser.py index c35febad..0254e57a 100644 --- a/uncompyle6/parser.py +++ b/uncompyle6/parser.py @@ -23,7 +23,6 @@ from __future__ import print_function import sys -from xdis import iscode, py_str2float from spark_parser import GenericASTBuilder, DEFAULT_DEBUG as PARSER_DEFAULT_DEBUG from uncompyle6.show import maybe_show_asm diff --git a/uncompyle6/scanner.py b/uncompyle6/scanner.py index d11adbfa..ba9374a6 100755 --- a/uncompyle6/scanner.py +++ b/uncompyle6/scanner.py @@ -28,7 +28,14 @@ import sys from uncompyle6.scanners.tok import Token from xdis.version_info import IS_PYPY, PYTHON3, version_tuple_to_str import xdis -from xdis import Bytecode, canonic_python_version, code2num, instruction_size, extended_arg_val, next_offset +from xdis import ( + Bytecode, + canonic_python_version, + code2num, + instruction_size, + extended_arg_val, + next_offset, +) # The byte code versions we support. # Note: these all have to be tuples of 2 ints @@ -111,7 +118,10 @@ class Scanner(object): exec("from xdis.opcodes import %s" % v_str) exec("self.opc = %s" % v_str) else: - raise TypeError("%s is not a Python version I know about" % version_tuple_to_str(version)) + raise TypeError( + "%s is not a Python version I know about" + % version_tuple_to_str(version) + ) self.opname = self.opc.opname @@ -566,7 +576,10 @@ def get_scanner(version, is_pypy=False, show_asm=None): "scan.Scanner%s(show_asm=show_asm)" % v_str, locals(), globals() ) else: - raise RuntimeError("Unsupported Python version %s" % version) + raise RuntimeError( + "Unsupported Python version, %s, for decompilation" + % version_tuple_to_str(version) + ) return scanner