From 4911d8523710101dcbfa9605dac52c188aafe4b9 Mon Sep 17 00:00:00 2001 From: rocky Date: Fri, 29 Oct 2021 22:06:18 -0400 Subject: [PATCH] Get ready for release 3.8.0 --- NEWS.md | 11 +++++++++++ __pkginfo__.py | 2 +- ...ck-older-versions.sh => check-2.4-2.7-versions.sh} | 2 +- admin-tools/make-dist-2.4-2.7.sh | 2 +- admin-tools/pyenv-older-versions | 9 --------- admin-tools/pyenv-oldest-versions | 9 --------- admin-tools/pyenv-versions | 2 +- uncompyle6/scanner.py | 7 +++---- uncompyle6/version.py | 2 +- 9 files changed, 19 insertions(+), 27 deletions(-) rename admin-tools/{check-older-versions.sh => check-2.4-2.7-versions.sh} (90%) delete mode 100644 admin-tools/pyenv-older-versions delete mode 100644 admin-tools/pyenv-oldest-versions diff --git a/NEWS.md b/NEWS.md index 375a0d71a..5125ccf76 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,14 @@ +3.8.0: 2020-10-29 +================= + +* Better handling of invalid bytecode magic +* Support running from 3.9 and 3.10 although we do not support those bytecodes +* Redo version comparisons using tuples instead of floats. This is needed for Python 3.10 +* Split out into 3 branches so that the master branch can assume Python 3.6+ conventions, especially type annotations +* Source Fragment fixes +* Lambda-bug fixes #360 +* Bug fixes + 3.7.4: 2020-8-05 ================ diff --git a/__pkginfo__.py b/__pkginfo__.py index 47719c016..d01a8bf4a 100644 --- a/__pkginfo__.py +++ b/__pkginfo__.py @@ -75,7 +75,7 @@ ] } ftp_url = None -install_requires = ["spark-parser >= 1.8.9, < 1.9.0", "xdis >= 6.0.0, < 6.1.0"] +install_requires = ["spark-parser >= 1.8.9, < 1.9.0", "xdis >= 6.0.2, < 6.1.0"] license = "GPL3" mailing_list = "python-debugger@googlegroups.com" diff --git a/admin-tools/check-older-versions.sh b/admin-tools/check-2.4-2.7-versions.sh similarity index 90% rename from admin-tools/check-older-versions.sh rename to admin-tools/check-2.4-2.7-versions.sh index 603c79207..85374d297 100755 --- a/admin-tools/check-older-versions.sh +++ b/admin-tools/check-2.4-2.7-versions.sh @@ -6,7 +6,7 @@ owd=$(pwd) trap finish EXIT cd $(dirname ${BASH_SOURCE[0]}) -if ! source ./pyenv-older-versions ; then +if ! source ./pyenv-2.4-2.7-versions ; then exit $? fi if ! source ./setup-python-2.4.sh ; then diff --git a/admin-tools/make-dist-2.4-2.7.sh b/admin-tools/make-dist-2.4-2.7.sh index 0e4189599..0b1f520a5 100755 --- a/admin-tools/make-dist-2.4-2.7.sh +++ b/admin-tools/make-dist-2.4-2.7.sh @@ -9,7 +9,7 @@ owd=$(pwd) trap finish EXIT cd $(dirname ${BASH_SOURCE[0]}) -if ! source ./pyenv-older-versions ; then +if ! source ./pyenv-2.4-2.7-versions ; then exit $? fi if ! source ./setup-python-2.4.sh ; then diff --git a/admin-tools/pyenv-older-versions b/admin-tools/pyenv-older-versions deleted file mode 100644 index 38d07ed8c..000000000 --- a/admin-tools/pyenv-older-versions +++ /dev/null @@ -1,9 +0,0 @@ -# -*- shell-script -*- -# Sets PYVERSIONS to be pyenv versions that -# we can use in the python-2.4 branch. - -if [[ $0 == ${BASH_SOURCE[0]} ]] ; then - echo "This script should be *sourced* rather than run directly through bash" - exit 1 -fi -export PYVERSIONS='2.4.6 2.5.6 2.6.9' diff --git a/admin-tools/pyenv-oldest-versions b/admin-tools/pyenv-oldest-versions deleted file mode 100644 index 254fcf855..000000000 --- a/admin-tools/pyenv-oldest-versions +++ /dev/null @@ -1,9 +0,0 @@ -# -*- shell-script -*- -# Sets PYVERSIONS to be all pyenv the oldest versions we have. -# These are not covered (yet) by uncompyle6, although -# some programs do work here. -if [[ $0 == ${BASH_SOURCE[0]} ]] ; then - echo "This script should be *sourced* rather than run directly through bash" - exit 1 -fi -export PYVERSIONS='2.1.3 2.2.3 2.3.7' diff --git a/admin-tools/pyenv-versions b/admin-tools/pyenv-versions index dc3768265..89141150d 100644 --- a/admin-tools/pyenv-versions +++ b/admin-tools/pyenv-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.7.10 3.8.10' +export PYVERSIONS='3.7.11 3.8.12' diff --git a/uncompyle6/scanner.py b/uncompyle6/scanner.py index ba9374a6c..8287b8022 100755 --- a/uncompyle6/scanner.py +++ b/uncompyle6/scanner.py @@ -111,10 +111,9 @@ def __init__(self, version, show_asm=None, is_pypy=False): self.is_pypy = is_pypy if version[:2] in PYTHON_VERSIONS: + v_str = f"""opcode_{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: @@ -544,7 +543,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 diff --git a/uncompyle6/version.py b/uncompyle6/version.py index 2e8badbdc..138213a19 100644 --- a/uncompyle6/version.py +++ b/uncompyle6/version.py @@ -14,4 +14,4 @@ # This file is suitable for sourcing inside POSIX shell as # well as importing into Python # fmt: off -__version__="3.7.5.dev0" # noqa +__version__="3.8.0" # noqa