You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
Get ready for release 2.12.0
This commit is contained in:
75
ChangeLog
75
ChangeLog
@@ -1,6 +1,79 @@
|
||||
2017-09-20 rocky <rb@dustyfeet.com>
|
||||
|
||||
* uncompyle6/semantics/fragments.py,
|
||||
uncompyle6/semantics/pysource.py: Tidy pysource and fragments a
|
||||
little more
|
||||
|
||||
2017-09-20 rocky <rb@dustyfeet.com>
|
||||
|
||||
* uncompyle6/semantics/consts.py: Tidy/regularize table entry
|
||||
formatting
|
||||
|
||||
2017-09-20 rocky <rb@dustyfeet.com>
|
||||
|
||||
* test/test_pythonlib.py, uncompyle6/semantics/pysource.py: Small
|
||||
fixes test_pyenvlib.py: it is sys.exit(), not exit() pysource.py:
|
||||
reinstate nod type of async_func_call
|
||||
|
||||
2017-09-20 rocky <rb@dustyfeet.com>
|
||||
|
||||
* uncompyle6/semantics/consts.py, uncompyle6/semantics/pysource.py:
|
||||
More small doc changes
|
||||
|
||||
2017-09-20 rocky <rb@dustyfeet.com>
|
||||
|
||||
* pytest/test_pysource.py, uncompyle6/semantics/pysource.py: Update
|
||||
Table-driven info... Start a pysource unit test.
|
||||
|
||||
2017-09-17 rocky <rb@dustyfeet.com>
|
||||
|
||||
* uncompyle6/semantics/fragments.py,
|
||||
uncompyle6/semantics/pysource.py: engine -> template_engine
|
||||
|
||||
2017-09-13 rocky <rb@dustyfeet.com>
|
||||
|
||||
* test/Makefile: Need weak-verification on 3.4 for now
|
||||
|
||||
2017-09-10 rocky <rb@dustyfeet.com>
|
||||
|
||||
* uncompyle6/semantics/fragments.py: Revert one of the changes
|
||||
pending a better fix
|
||||
|
||||
2017-09-10 rocky <rb@dustyfeet.com>
|
||||
|
||||
* uncompyle6/semantics/fragments.py,
|
||||
uncompyle6/semantics/pysource.py: More semantic action cleanup
|
||||
|
||||
2017-09-10 rocky <rb@dustyfeet.com>
|
||||
|
||||
* uncompyle6/scanners/scanner3.py, uncompyle6/scanners/tok.py: Match
|
||||
Python 3.4's terms a little names better
|
||||
|
||||
2017-09-09 rocky <rb@dustyfeet.com>
|
||||
|
||||
* uncompyle6/scanners/tok.py: Revert last revert
|
||||
|
||||
2017-09-09 rocky <rb@dustyfeet.com>
|
||||
|
||||
* uncompyle6/scanners/tok.py: Revert last change
|
||||
|
||||
2017-09-09 rocky <rb@dustyfeet.com>
|
||||
|
||||
* uncompyle6/scanners/tok.py: New-style Python classes only, please.
|
||||
|
||||
2017-08-31 rocky <rb@dustyfeet.com>
|
||||
|
||||
* NEWS, README.rst, uncompyle6/parsers/parse37.py,
|
||||
* uncompyle6/scanner.py, uncompyle6/scanners/scanner37.py: Skeletal
|
||||
support for Python 3.7 Largely failing though.
|
||||
|
||||
2017-08-31 rocky <rb@dustyfeet.com>
|
||||
|
||||
* README.rst: Remove python versions tag I think it's messing up Pypi's very fussy formatting
|
||||
|
||||
2017-08-31 rocky <rb@dustyfeet.com>
|
||||
|
||||
* ChangeLog, NEWS, README.rst, __pkginfo__.py,
|
||||
uncompyle6/parsers/parse37.py,
|
||||
uncompyle6/semantics/make_function.py, uncompyle6/version.py: Get
|
||||
ready for release 2.11.5
|
||||
|
||||
|
11
NEWS
11
NEWS
@@ -1,3 +1,14 @@
|
||||
uncompyle6 2.12.0 2017-09-25
|
||||
|
||||
- Use xdis 3.6.0 or greater now
|
||||
- Small semantic table cleanups
|
||||
- Python 3.4's terms a little names better
|
||||
- Slightly more Python 3.7, but still failing a lot
|
||||
|
||||
uncompyle6 2.11.5 2017-08-31
|
||||
|
||||
- Skeletal support for Python 3.7
|
||||
|
||||
uncompyle6 2.11.4 2017-08-15
|
||||
|
||||
* scanner and parser now allow 3-part version string lookups,
|
||||
|
@@ -40,7 +40,7 @@ entry_points = {
|
||||
]}
|
||||
ftp_url = None
|
||||
install_requires = ['spark-parser >= 1.6.1, < 1.7.0',
|
||||
'xdis >= 3.5.5, < 3.6.0', 'six']
|
||||
'xdis >= 3.6.0, < 3.7.0', 'six']
|
||||
license = 'MIT'
|
||||
mailing_list = 'python-debugger@googlegroups.com'
|
||||
modname = 'uncompyle6'
|
||||
|
@@ -8,8 +8,8 @@ Creates Python source code from an uncompyle6 abstract syntax tree,
|
||||
and indexes fragments which can be accessed by instruction offset
|
||||
address.
|
||||
|
||||
See the comments in pysource for information on the abstract sytax tree
|
||||
and how semantic actions are written.
|
||||
See https://github.com/rocky/python-uncompyle6/wiki/Table-driven-semantic-actions.
|
||||
for a more complete explanation, nicely marked up and with examples.
|
||||
|
||||
We add some format specifiers here not used in pysource
|
||||
|
||||
@@ -421,10 +421,10 @@ class FragmentsWalker(pysource.SourceWalker, object):
|
||||
self.write(self.indent, 'if ')
|
||||
self.preorder(node[0])
|
||||
self.println(':')
|
||||
self.indentMore()
|
||||
self.indent_more()
|
||||
node[1].parent = node
|
||||
self.preorder(node[1])
|
||||
self.indentLess()
|
||||
self.indent_less()
|
||||
|
||||
if_ret_at_end = False
|
||||
if len(node[2][0]) >= 3:
|
||||
@@ -443,17 +443,17 @@ class FragmentsWalker(pysource.SourceWalker, object):
|
||||
prev_stmt_is_if_ret = False
|
||||
if not past_else and not if_ret_at_end:
|
||||
self.println(self.indent, 'else:')
|
||||
self.indentMore()
|
||||
self.indent_more()
|
||||
past_else = True
|
||||
n.parent = node
|
||||
self.preorder(n)
|
||||
if not past_else or if_ret_at_end:
|
||||
self.println(self.indent, 'else:')
|
||||
self.indentMore()
|
||||
self.indent_more()
|
||||
node[2][1].parent = node
|
||||
self.preorder(node[2][1])
|
||||
self.set_pos_info(node, start, len(self.f.getvalue()))
|
||||
self.indentLess()
|
||||
self.indent_less()
|
||||
self.prune()
|
||||
|
||||
def n_elifelsestmtr(self, node):
|
||||
@@ -470,20 +470,20 @@ class FragmentsWalker(pysource.SourceWalker, object):
|
||||
node[0].parent = node
|
||||
self.preorder(node[0])
|
||||
self.println(':')
|
||||
self.indentMore()
|
||||
self.indent_more()
|
||||
node[1].parent = node
|
||||
self.preorder(node[1])
|
||||
self.indentLess()
|
||||
self.indent_less()
|
||||
|
||||
for n in node[2][0]:
|
||||
n[0].type = 'elifstmt'
|
||||
n.parent = node
|
||||
self.preorder(n)
|
||||
self.println(self.indent, 'else:')
|
||||
self.indentMore()
|
||||
self.indent_more()
|
||||
node[2][1].parent = node
|
||||
self.preorder(node[2][1])
|
||||
self.indentLess()
|
||||
self.indent_less()
|
||||
self.set_pos_info(node, start, len(self.f.getvalue()))
|
||||
self.prune()
|
||||
|
||||
@@ -527,7 +527,7 @@ class FragmentsWalker(pysource.SourceWalker, object):
|
||||
self.write(func_name)
|
||||
self.set_pos_info(code_node, start, len(self.f.getvalue()))
|
||||
|
||||
self.indentMore()
|
||||
self.indent_more()
|
||||
start = len(self.f.getvalue())
|
||||
self.make_function(node, isLambda=False, codeNode=code_node)
|
||||
|
||||
@@ -537,7 +537,7 @@ class FragmentsWalker(pysource.SourceWalker, object):
|
||||
self.write('\n\n')
|
||||
else:
|
||||
self.write('\n\n\n')
|
||||
self.indentLess()
|
||||
self.indent_less()
|
||||
self.prune() # stop recursing
|
||||
|
||||
def n_list_compr(self, node):
|
||||
@@ -977,9 +977,9 @@ class FragmentsWalker(pysource.SourceWalker, object):
|
||||
self.println(':')
|
||||
|
||||
# class body
|
||||
self.indentMore()
|
||||
self.indent_more()
|
||||
self.build_class(subclass)
|
||||
self.indentLess()
|
||||
self.indent_less()
|
||||
|
||||
self.currentclass = cclass
|
||||
self.set_pos_info(node, start, len(self.f.getvalue()))
|
||||
@@ -1316,7 +1316,7 @@ class FragmentsWalker(pysource.SourceWalker, object):
|
||||
p = self.prec
|
||||
self.prec = 100
|
||||
|
||||
self.indentMore(INDENT_PER_LEVEL)
|
||||
self.indent_more(INDENT_PER_LEVEL)
|
||||
line_seperator = ',\n' + self.indent
|
||||
sep = INDENT_PER_LEVEL[:-1]
|
||||
start = len(self.f.getvalue())
|
||||
@@ -1393,7 +1393,7 @@ class FragmentsWalker(pysource.SourceWalker, object):
|
||||
n.parent = node
|
||||
self.set_pos_info(n, start, finish)
|
||||
self.set_pos_info(node, start, finish)
|
||||
self.indentLess(INDENT_PER_LEVEL)
|
||||
self.indent_less(INDENT_PER_LEVEL)
|
||||
self.prec = p
|
||||
self.prune()
|
||||
|
||||
@@ -1429,7 +1429,7 @@ class FragmentsWalker(pysource.SourceWalker, object):
|
||||
else:
|
||||
flat_elems.append(elem)
|
||||
|
||||
self.indentMore(INDENT_PER_LEVEL)
|
||||
self.indent_more(INDENT_PER_LEVEL)
|
||||
if len(node) > 3:
|
||||
line_separator = ',\n' + self.indent
|
||||
else:
|
||||
@@ -1454,7 +1454,7 @@ class FragmentsWalker(pysource.SourceWalker, object):
|
||||
n.parent = node.parent
|
||||
self.set_pos_info(n, start, finish)
|
||||
self.set_pos_info(node, start, finish)
|
||||
self.indentLess(INDENT_PER_LEVEL)
|
||||
self.indent_less(INDENT_PER_LEVEL)
|
||||
self.prec = p
|
||||
self.prune()
|
||||
|
||||
@@ -1498,8 +1498,8 @@ class FragmentsWalker(pysource.SourceWalker, object):
|
||||
self.write('%')
|
||||
self.set_pos_info(node, start, len(self.f.getvalue()))
|
||||
|
||||
elif typ == '+': self.indentMore()
|
||||
elif typ == '-': self.indentLess()
|
||||
elif typ == '+': self.indent_more()
|
||||
elif typ == '-': self.indent_less()
|
||||
elif typ == '|': self.write(self.indent)
|
||||
# no longer used, since BUILD_TUPLE_n is pretty printed:
|
||||
elif typ == 'r': recurse_node = True
|
||||
|
@@ -350,7 +350,7 @@ class SourceWalker(GenericASTTraversal, object):
|
||||
# MAKE_FUNCTION ..
|
||||
code = node[-3]
|
||||
|
||||
self.indentMore()
|
||||
self.indent_more()
|
||||
for annotate_last in range(len(node)-1, -1, -1):
|
||||
if node[annotate_last] == 'annotate_tuple':
|
||||
break
|
||||
@@ -370,7 +370,7 @@ class SourceWalker(GenericASTTraversal, object):
|
||||
self.write('\n\n')
|
||||
else:
|
||||
self.write('\n\n\n')
|
||||
self.indentLess()
|
||||
self.indent_less()
|
||||
self.prune() # stop recursing
|
||||
self.n_mkfunc_annotate = n_mkfunc_annotate
|
||||
|
||||
@@ -550,10 +550,10 @@ class SourceWalker(GenericASTTraversal, object):
|
||||
super(SourceWalker, self).preorder(node)
|
||||
self.set_pos_info(node)
|
||||
|
||||
def indentMore(self, indent=TAB):
|
||||
def indent_more(self, indent=TAB):
|
||||
self.indent += indent
|
||||
|
||||
def indentLess(self, indent=TAB):
|
||||
def indent_less(self, indent=TAB):
|
||||
self.indent = self.indent[:-len(indent)]
|
||||
|
||||
def traverse(self, node, indent=None, isLambda=False):
|
||||
@@ -871,9 +871,9 @@ class SourceWalker(GenericASTTraversal, object):
|
||||
self.write(self.indent, 'if ')
|
||||
self.preorder(node[0])
|
||||
self.println(':')
|
||||
self.indentMore()
|
||||
self.indent_more()
|
||||
self.preorder(node[1])
|
||||
self.indentLess()
|
||||
self.indent_less()
|
||||
|
||||
if_ret_at_end = False
|
||||
if len(return_stmts_node[0]) >= 3:
|
||||
@@ -892,14 +892,14 @@ class SourceWalker(GenericASTTraversal, object):
|
||||
prev_stmt_is_if_ret = False
|
||||
if not past_else and not if_ret_at_end:
|
||||
self.println(self.indent, 'else:')
|
||||
self.indentMore()
|
||||
self.indent_more()
|
||||
past_else = True
|
||||
self.preorder(n)
|
||||
if not past_else or if_ret_at_end:
|
||||
self.println(self.indent, 'else:')
|
||||
self.indentMore()
|
||||
self.indent_more()
|
||||
self.preorder(return_stmts_node[1])
|
||||
self.indentLess()
|
||||
self.indent_less()
|
||||
self.prune()
|
||||
n_ifelsestmtr2 = n_ifelsestmtr
|
||||
|
||||
@@ -921,17 +921,17 @@ class SourceWalker(GenericASTTraversal, object):
|
||||
self.write(self.indent, 'elif ')
|
||||
self.preorder(node[0])
|
||||
self.println(':')
|
||||
self.indentMore()
|
||||
self.indent_more()
|
||||
self.preorder(node[1])
|
||||
self.indentLess()
|
||||
self.indent_less()
|
||||
|
||||
for n in return_stmts_node[0]:
|
||||
n[0].type = 'elifstmt'
|
||||
self.preorder(n)
|
||||
self.println(self.indent, 'else:')
|
||||
self.indentMore()
|
||||
self.indent_more()
|
||||
self.preorder(return_stmts_node[1])
|
||||
self.indentLess()
|
||||
self.indent_less()
|
||||
self.prune()
|
||||
|
||||
def n_import_as(self, node):
|
||||
@@ -972,14 +972,14 @@ class SourceWalker(GenericASTTraversal, object):
|
||||
func_name = code_node.attr.co_name
|
||||
self.write(func_name)
|
||||
|
||||
self.indentMore()
|
||||
self.indent_more()
|
||||
self.make_function(node, isLambda=False, codeNode=code_node)
|
||||
|
||||
if len(self.param_stack) > 1:
|
||||
self.write('\n\n')
|
||||
else:
|
||||
self.write('\n\n\n')
|
||||
self.indentLess()
|
||||
self.indent_less()
|
||||
self.prune() # stop recursing
|
||||
|
||||
def make_function(self, node, isLambda, nested=1,
|
||||
@@ -1450,9 +1450,9 @@ class SourceWalker(GenericASTTraversal, object):
|
||||
self.println(':')
|
||||
|
||||
# class body
|
||||
self.indentMore()
|
||||
self.indent_more()
|
||||
self.build_class(subclass_code)
|
||||
self.indentLess()
|
||||
self.indent_less()
|
||||
|
||||
self.currentclass = cclass
|
||||
if len(self.param_stack) > 1:
|
||||
@@ -1523,7 +1523,7 @@ class SourceWalker(GenericASTTraversal, object):
|
||||
p = self.prec
|
||||
self.prec = 100
|
||||
|
||||
self.indentMore(INDENT_PER_LEVEL)
|
||||
self.indent_more(INDENT_PER_LEVEL)
|
||||
sep = INDENT_PER_LEVEL[:-1]
|
||||
self.write('{')
|
||||
line_number = self.line_number
|
||||
@@ -1661,7 +1661,7 @@ class SourceWalker(GenericASTTraversal, object):
|
||||
if sep.startswith(",\n"):
|
||||
self.write(sep[1:])
|
||||
self.write('}')
|
||||
self.indentLess(INDENT_PER_LEVEL)
|
||||
self.indent_less(INDENT_PER_LEVEL)
|
||||
self.prec = p
|
||||
self.prune()
|
||||
|
||||
@@ -1712,7 +1712,7 @@ class SourceWalker(GenericASTTraversal, object):
|
||||
else:
|
||||
flat_elems.append(elem)
|
||||
|
||||
self.indentMore(INDENT_PER_LEVEL)
|
||||
self.indent_more(INDENT_PER_LEVEL)
|
||||
sep = ''
|
||||
|
||||
for elem in flat_elems:
|
||||
@@ -1737,7 +1737,7 @@ class SourceWalker(GenericASTTraversal, object):
|
||||
if lastnode.attr == 1 and lastnodetype.startswith('BUILD_TUPLE'):
|
||||
self.write(',')
|
||||
self.write(endchar)
|
||||
self.indentLess(INDENT_PER_LEVEL)
|
||||
self.indent_less(INDENT_PER_LEVEL)
|
||||
self.prec = p
|
||||
self.prune()
|
||||
|
||||
@@ -1812,10 +1812,10 @@ class SourceWalker(GenericASTTraversal, object):
|
||||
if typ == '%': self.write('%')
|
||||
elif typ == '+':
|
||||
self.line_number += 1
|
||||
self.indentMore()
|
||||
self.indent_more()
|
||||
elif typ == '-':
|
||||
self.line_number += 1
|
||||
self.indentLess()
|
||||
self.indent_less()
|
||||
elif typ == '|':
|
||||
self.line_number += 1
|
||||
self.write(self.indent)
|
||||
|
@@ -1,3 +1,3 @@
|
||||
# This file is suitable for sourcing inside bash as
|
||||
# well as importing into Python
|
||||
VERSION='2.11.5'
|
||||
VERSION='2.12.0'
|
||||
|
Reference in New Issue
Block a user