You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
Fix bug in 3.5+ async stmt ..
and in verification status message
This commit is contained in:
@@ -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
|
||||||
|
BIN
test/bytecode_3.5/04_async_stmt.pyc
Normal file
BIN
test/bytecode_3.5/04_async_stmt.pyc
Normal file
Binary file not shown.
9
test/simple_source/bug35/04_async_stmt.py
Normal file
9
test/simple_source/bug35/04_async_stmt.py
Normal 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
|
@@ -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'
|
||||||
|
@@ -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': (
|
||||||
|
Reference in New Issue
Block a user