diff --git a/__pkginfo__.py b/__pkginfo__.py index f1d1de9d..c661f20c 100644 --- a/__pkginfo__.py +++ b/__pkginfo__.py @@ -35,6 +35,7 @@ classifiers = ['Development Status :: 5 - Production/Stable', 'Programming Language :: Python :: 2.5', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3.1', 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', diff --git a/admin-tools/pyenv-newer-versions b/admin-tools/pyenv-newer-versions index 1e2fe497..f3de843f 100644 --- a/admin-tools/pyenv-newer-versions +++ b/admin-tools/pyenv-newer-versions @@ -5,4 +5,4 @@ if [[ $0 == ${BASH_SOURCE[0]} ]] ; then echo "This script should be *sourced* rather than run directly through bash" exit 1 fi -export PYVERSIONS='3.5.5 3.6.4 2.6.9 3.3.7 2.7.14 3.2.6 3.4.8' +export PYVERSIONS='3.5.5 3.6.4 2.6.9 3.3.7 2.7.14 3.2.6 3.1.5 3.4.8' diff --git a/setup.py b/setup.py index b8aa6da2..9fcc0bb9 100755 --- a/setup.py +++ b/setup.py @@ -4,12 +4,12 @@ import sys """Setup script for the 'uncompyle6' distribution.""" SYS_VERSION = sys.version_info[0:2] -if not ((2, 6) <= SYS_VERSION <= (3, 7)) or ((3, 0) <= SYS_VERSION <= (3, 1)): - mess = "Python Release 2.6 .. 3.7 excluding 3.0 and 3.1 are supported in this code branch." +if not ((2, 6) <= SYS_VERSION <= (3, 7)) or ((3, 0) <= SYS_VERSION <= (3, 0)): + mess = "Python Release 2.6 .. 3.7 excluding 3.0 are supported in this code branch." if ((2, 4) <= SYS_VERSION <= (2, 7)): mess += ("\nFor your Python, version %s, use the python-2.4 code/branch." % sys.version[0:3]) - elif SYS_VERSION < (2, 4) or ((3, 0) <= SYS_VERSION <= (3, 1)): + elif SYS_VERSION < (2, 4) or (3, 0) <= SYS_VERSION: mess += ("\nThis package is not supported for Python version %s." % sys.version[0:3]) print(mess) diff --git a/test/bytecode_3.1/04_call_function.pyc b/test/bytecode_3.1/04_call_function.pyc new file mode 100644 index 00000000..ab1ceeb2 Binary files /dev/null and b/test/bytecode_3.1/04_call_function.pyc differ diff --git a/uncompyle6/semantics/make_function.py b/uncompyle6/semantics/make_function.py index 5806433f..997bb2eb 100644 --- a/uncompyle6/semantics/make_function.py +++ b/uncompyle6/semantics/make_function.py @@ -523,7 +523,7 @@ def make_function3(self, node, is_lambda, nested=1, codeNode=None): lc_index = -3 pass - if (3.2 <= self.version <= 3.3 and len(node) > 2 and + if (3.1 <= self.version <= 3.3 and len(node) > 2 and node[lambda_index] != 'LOAD_LAMBDA' and (have_kwargs or node[lc_index].kind != 'load_closure')): @@ -591,7 +591,7 @@ def make_function3(self, node, is_lambda, nested=1, codeNode=None): paramnames = list(scanner_code.co_varnames[:argc]) # defaults are for last n parameters, thus reverse - if not 3.0 <= self.version <= 3.1 or self.version >= 3.6: + if not 3.0 == self.version or self.version >= 3.6: paramnames.reverse(); defparams.reverse() try: @@ -621,7 +621,7 @@ def make_function3(self, node, is_lambda, nested=1, codeNode=None): else: params = paramnames - if not 3.0 <= self.version <= 3.1 or self.version >= 3.6: + if not 3.0 == self.version or self.version >= 3.6: params.reverse() # back to correct order if code_has_star_arg(code):