Fix bug in 3.5+ async stmt ..

and in verification status message
This commit is contained in:
rocky
2018-01-19 03:15:08 -05:00
parent 4dfb85f062
commit 2126e4cf32
5 changed files with 15 additions and 6 deletions

View File

@@ -9,7 +9,7 @@
# Things that change more often go here. # Things that change more often go here.
copyright = """ copyright = """
Copyright (C) 2015-2017 Rocky Bernstein <rb@dustyfeet.com>. Copyright (C) 2015-2018 Rocky Bernstein <rb@dustyfeet.com>.
""" """
classifiers = ['Development Status :: 5 - Production/Stable', classifiers = ['Development Status :: 5 - Production/Stable',
@@ -41,12 +41,12 @@ entry_points = {
]} ]}
ftp_url = None ftp_url = None
install_requires = ['spark-parser >= 1.8.5, < 1.9.0', install_requires = ['spark-parser >= 1.8.5, < 1.9.0',
'xdis >= 3.6.5, < 3.7.0', 'six'] 'xdis >= 3.6.6, < 3.7.0', 'six']
license = 'MIT' license = 'MIT'
mailing_list = 'python-debugger@googlegroups.com' mailing_list = 'python-debugger@googlegroups.com'
modname = 'uncompyle6' modname = 'uncompyle6'
py_modules = None py_modules = None
short_desc = 'Python cross-version byte-code deparser' short_desc = 'Python cross-version byte-code decompiler'
web = 'https://github.com/rocky/python-uncompyle6/' web = 'https://github.com/rocky/python-uncompyle6/'
# tracebacks in zip files are funky and not debuggable # tracebacks in zip files are funky and not debuggable

Binary file not shown.

View File

@@ -0,0 +1,9 @@
# From 3.5 _collections.abc.py
# Bug was not having \n after "await self.athrow()" stmt
async def aclose(self):
try:
await self.athrow()
except (GeneratorExit):
pass
else:
raise RuntimeError

View File

@@ -217,7 +217,7 @@ def main(in_base, out_base, files, codes, outfile=None,
if current_outfile: if current_outfile:
sys.stdout.write("%s\r" % sys.stdout.write("%s\r" %
status_msg(do_verify, tot_files, okay_files, failed_files, status_msg(do_verify, tot_files, okay_files, failed_files,
verify_failed_files, None)) verify_failed_files, do_verify))
sys.stdout.flush() sys.stdout.flush()
if current_outfile: if current_outfile:
sys.stdout.write("\n") sys.stdout.write("\n")
@@ -239,7 +239,7 @@ else:
def status_msg(do_verify, tot_files, okay_files, failed_files, def status_msg(do_verify, tot_files, okay_files, failed_files,
verify_failed_files, weak_verify): verify_failed_files, weak_verify):
if weak_verify: if weak_verify == 'weak':
verification_type = 'weak' verification_type = 'weak'
else: else:
verification_type = 'strong' verification_type = 'strong'

View File

@@ -441,7 +441,7 @@ class SourceWalker(GenericASTTraversal, object):
if version >= 3.5: if version >= 3.5:
TABLE_DIRECT.update({ TABLE_DIRECT.update({
'await_expr': ( 'await %c', 0), 'await_expr': ( 'await %c', 0),
'await_stmt': ( '%|%c', 0), 'await_stmt': ( '%|%c\n', 0),
'async_for_stmt': ( 'async_for_stmt': (
'%|async for %c in %c:\n%+%c%-\n\n', 9, 1, 25 ), '%|async for %c in %c:\n%+%c%-\n\n', 9, 1, 25 ),
'async_forelse_stmt': ( 'async_forelse_stmt': (