diff --git a/NEWS.md b/NEWS.md index 7752f9189..375a0d71a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,14 @@ +3.7.4: 2020-8-05 +================ + +* Fragment parsing was borked. This means deparsing in trepan2/trepan3k was broken +* 3.7+: narrow precedence for call tatement +* del_stmt -> delete to better match Python AST +* 3.8+ Add another `forelsestmt` (found only in a loop) +* 3.8+ Add precedence on walrus operator +* More files blackened +* bump min xdis version + 3.7.3: 2020-7-25 ================ diff --git a/__pkginfo__.py b/__pkginfo__.py index ff206581b..c425c768b 100644 --- a/__pkginfo__.py +++ b/__pkginfo__.py @@ -33,65 +33,71 @@ # 3.4 | pip | 19.1.1 | # Things that change more often go here. -copyright = """ +copyright = """ Copyright (C) 2015-2020 Rocky Bernstein . """ -classifiers = ["Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 2.4", - "Programming Language :: Python :: 2.5", - "Programming Language :: Python :: 2.6", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3.0", - "Programming Language :: Python :: 3.1", - "Programming Language :: Python :: 3.2", - "Programming Language :: Python :: 3.3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Topic :: Software Development :: Debuggers", - "Topic :: Software Development :: Libraries :: Python Modules", - ] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 2.4", + "Programming Language :: Python :: 2.5", + "Programming Language :: Python :: 2.6", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3.0", + "Programming Language :: Python :: 3.1", + "Programming Language :: Python :: 3.2", + "Programming Language :: Python :: 3.3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Topic :: Software Development :: Debuggers", + "Topic :: Software Development :: Libraries :: Python Modules", +] # The rest in alphabetic order -author = "Rocky Bernstein, Hartmut Goebel, John Aycock, and others" -author_email = "rb@dustyfeet.com" -entry_points = { +author = "Rocky Bernstein, Hartmut Goebel, John Aycock, and others" +author_email = "rb@dustyfeet.com" +entry_points = { "console_scripts": [ "uncompyle6=uncompyle6.bin.uncompile:main_bin", "pydisassemble=uncompyle6.bin.pydisassemble:main", - ]} -ftp_url = None -install_requires = ["spark-parser >= 1.8.9, < 1.9.0", - "xdis >= 4.7.0, <5.1.0"] - -license = "GPL3" -mailing_list = "python-debugger@googlegroups.com" -modname = "uncompyle6" -py_modules = None -short_desc = "Python cross-version byte-code decompiler" -web = "https://github.com/rocky/python-uncompyle6/" + ] +} +ftp_url = None +install_requires = ["spark-parser >= 1.8.9, < 1.9.0", "xdis >= 5.0.4, <5.1.0"] + +license = "GPL3" +mailing_list = "python-debugger@googlegroups.com" +modname = "uncompyle6" +py_modules = None +short_desc = "Python cross-version byte-code decompiler" +web = "https://github.com/rocky/python-uncompyle6/" # tracebacks in zip files are funky and not debuggable zip_safe = True import os.path + + def get_srcdir(): filename = os.path.normcase(os.path.dirname(os.path.abspath(__file__))) return os.path.realpath(filename) + srcdir = get_srcdir() + def read(*rnames): return open(os.path.join(srcdir, *rnames)).read() + # Get info from files; set: long_description and VERSION -long_description = ( read("README.rst") + "\n" ) +long_description = read("README.rst") + "\n" exec(read("uncompyle6/version.py")) diff --git a/admin-tools/how-to-make-a-release.md b/admin-tools/how-to-make-a-release.md index 6420821c5..4a854a9da 100644 --- a/admin-tools/how-to-make-a-release.md +++ b/admin-tools/how-to-make-a-release.md @@ -55,11 +55,11 @@ # Make packages and tag $ . ./admin-tools/make-dist-older.sh - $ pyenv local 3.8.4 + $ pyenv local 3.8.5 $ twine check dist/uncompyle6-$VERSION* + $ git tag release-python-2.4-$VERSION $ ./admin-tools/make-dist-newer.sh $ twine check dist/uncompyle6-$VERSION* - $ git tag release-python-2.4-$VERSION # Check package on github diff --git a/admin-tools/pyenv-newer-versions b/admin-tools/pyenv-newer-versions index 89924a551..d1dba9537 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.9 3.6.11 2.6.9 3.3.7 2.7.18 3.2.6 3.1.5 3.4.10 3.7.8 3.8.5' +export PYVERSIONS='3.5.9 3.6.12 2.6.9 3.3.7 2.7.18 3.2.6 3.1.5 3.4.10 3.7.9 3.8.5' diff --git a/uncompyle6/show.py b/uncompyle6/show.py index 13aca7337..25acdc5c2 100644 --- a/uncompyle6/show.py +++ b/uncompyle6/show.py @@ -1,4 +1,4 @@ -# Copyright (C) 2018 Rocky Bernstein +# Copyright (C) 2018, 2020 Rocky Bernstein # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -47,8 +47,11 @@ def maybe_show_tree(walker, ast): stream = walker.showast else: stream = sys.stdout - if (isinstance(walker.showast, dict) and walker.showast.get("Full", False) - and hasattr(walker, "str_with_template")): + if ( + isinstance(walker.showast, dict) + and walker.showast.get("Full", False) + and hasattr(walker, "str_with_template") + ): walker.str_with_template(ast) else: stream.write(str(ast)) diff --git a/uncompyle6/util.py b/uncompyle6/util.py index 3a6c55612..aeec12eda 100644 --- a/uncompyle6/util.py +++ b/uncompyle6/util.py @@ -5,10 +5,12 @@ from math import copysign from uncompyle6 import PYTHON_VERSION + def is_negative_zero(n): """Returns true if n is -0.0""" return n == 0.0 and copysign(1, n) == -1 + def better_repr(v, version): """Work around Python's unorthogonal and unhelpful repr() for primitive float and complex.""" diff --git a/uncompyle6/version.py b/uncompyle6/version.py index b43d84bef..060dfaaf3 100644 --- a/uncompyle6/version.py +++ b/uncompyle6/version.py @@ -12,4 +12,4 @@ # along with this program. If not, see . # This file is suitable for sourcing inside POSIX shell as # well as importing into Python -VERSION="3.7.3" # noqa +VERSION="3.7.4" # noqa