You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 01:09:52 +08:00
Merge branch 'master' into python-2.4
This commit is contained in:
12
NEWS.md
12
NEWS.md
@@ -1,3 +1,15 @@
|
||||
3.7.3: 2020-7-25
|
||||
================
|
||||
|
||||
Mostly small miscellaneous bug fixes
|
||||
|
||||
* `__doc__ = DocDescr()` from `test_descr.py` was getting confused as a docstring.
|
||||
* detect 2.7 exchandler range better
|
||||
* Add for .. else reduction checks on 2.6 and before
|
||||
* Add reduce check for 2.7 augmented assign
|
||||
* Add VERSION in a pydoc-friendly way
|
||||
|
||||
|
||||
3.7.2: 2020-6-27
|
||||
================
|
||||
|
||||
|
0
admin-tools/check-newer-versions.sh
Normal file → Executable file
0
admin-tools/check-newer-versions.sh
Normal file → Executable file
0
admin-tools/check-older-versions.sh
Normal file → Executable file
0
admin-tools/check-older-versions.sh
Normal file → Executable file
@@ -39,7 +39,7 @@
|
||||
|
||||
# Make sure pyenv is running and check newer versions
|
||||
|
||||
$ pyenv local && source admin-tools/check-newer-versions.sh
|
||||
$ admin-tools/check-newer-versions.sh
|
||||
|
||||
# Switch to python-2.4, sync that up and build that first since it creates a tarball which we don't want.
|
||||
|
||||
@@ -50,19 +50,19 @@
|
||||
|
||||
# Check against older versions
|
||||
|
||||
$ source admin-tools/check-older-versions.sh
|
||||
$ admin-tools/check-older-versions.sh
|
||||
|
||||
# Make packages and tag
|
||||
|
||||
$ . ./admin-tools/make-dist-older.sh
|
||||
$ pyenv local 3.8.3
|
||||
$ pyenv local 3.8.4
|
||||
$ twine check dist/uncompyle6-$VERSION*
|
||||
$ ./admin-tools/make-dist-newer.sh
|
||||
$ twine check dist/uncompyle6-$VERSION*
|
||||
$ git tag release-python-2.4-$VERSION
|
||||
$ . ./admin-tools/make-dist-newer.sh
|
||||
|
||||
# Check package on github
|
||||
|
||||
$ mkdir /tmp/gittest; pushd /tmp/gittest
|
||||
$ [[ ! -d /tmp/gittest ]] && mkdir /tmp/gittest; pushd /tmp/gittest
|
||||
$ pyenv local 3.7.5
|
||||
$ pip install -e git://github.com/rocky/python-uncompyle6.git#egg=uncompyle6
|
||||
$ uncompyle6 --help
|
||||
|
@@ -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.10 2.6.9 3.3.7 2.7.18 3.2.6 3.1.5 3.4.10 3.7.7 3.8.3'
|
||||
export PYVERSIONS='3.5.9 3.6.10 2.6.9 3.3.7 2.7.18 3.2.6 3.1.5 3.4.10 3.7.7 3.8.4'
|
||||
|
@@ -28,9 +28,14 @@
|
||||
|
||||
import sys
|
||||
|
||||
__docformat__ = 'restructuredtext'
|
||||
__docformat__ = "restructuredtext"
|
||||
|
||||
PYTHON3 = (sys.version_info >= (3, 0))
|
||||
from uncompyle6.version import VERSION
|
||||
|
||||
# This ensures VERSION will appear in pydoc
|
||||
__version__ = VERSION
|
||||
|
||||
PYTHON3 = sys.version_info >= (3, 0)
|
||||
|
||||
# We do this crazy way to support Python 2.6 which
|
||||
# doesn't support version_major, and has a bug in
|
||||
@@ -39,9 +44,9 @@ PYTHON3 = (sys.version_info >= (3, 0))
|
||||
PYTHON_VERSION = sys.version_info[0] + (sys.version_info[1] / 10.0)
|
||||
PYTHON_VERSION_STR = "%s.%s" % (sys.version_info[0], sys.version_info[1])
|
||||
|
||||
IS_PYPY = '__pypy__' in sys.builtin_module_names
|
||||
IS_PYPY = "__pypy__" in sys.builtin_module_names
|
||||
|
||||
if hasattr(sys, 'setrecursionlimit'):
|
||||
if hasattr(sys, "setrecursionlimit"):
|
||||
# pyston doesn't have setrecursionlimit
|
||||
sys.setrecursionlimit(5000)
|
||||
|
||||
|
@@ -2,13 +2,15 @@
|
||||
|
||||
def except_handler(self, lhs, n, rule, ast, tokens, first, last):
|
||||
end_token = tokens[last-1]
|
||||
|
||||
# print("XXX", first, last)
|
||||
# for t in range(first, last):
|
||||
# print(tokens[t])
|
||||
# print("=" * 30)
|
||||
|
||||
# FIXME: Figure out why this doesn't work on
|
||||
# bytecode-1.4/anydbm.pyc
|
||||
if self.version != 1.4:
|
||||
if self.version == 1.4:
|
||||
return False
|
||||
|
||||
# Make sure come froms all come from within "except_handler".
|
||||
|
@@ -587,8 +587,7 @@ class SourceWalker(GenericASTTraversal, object):
|
||||
if n == "LOAD_CONST" and repr(n.pattr)[0] == "-":
|
||||
self.prec = 6
|
||||
|
||||
# print(n.kind, p, "<", self.prec)
|
||||
# print(self.f.getvalue())
|
||||
# print("XXX", n.kind, p, "<", self.prec)
|
||||
|
||||
if p < self.prec:
|
||||
self.write("(")
|
||||
@@ -604,7 +603,6 @@ class SourceWalker(GenericASTTraversal, object):
|
||||
# If expr is yield we want parens.
|
||||
self.prec = PRECEDENCE["yield"] - 1
|
||||
self.n_expr(node[0])
|
||||
p = self.prec
|
||||
else:
|
||||
self.n_expr(node)
|
||||
|
||||
|
@@ -12,4 +12,4 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# This file is suitable for sourcing inside POSIX shell as
|
||||
# well as importing into Python
|
||||
VERSION="3.7.2" # noqa
|
||||
VERSION="3.7.3" # noqa
|
||||
|
Reference in New Issue
Block a user