diff --git a/__pkginfo__.py b/__pkginfo__.py index 32e15b76..4dbe85d5 100644 --- a/__pkginfo__.py +++ b/__pkginfo__.py @@ -9,7 +9,7 @@ # Things that change more often go here. copyright = """ -Copyright (C) 2015-2017 Rocky Bernstein . +Copyright (C) 2015-2018 Rocky Bernstein . """ classifiers = ['Development Status :: 5 - Production/Stable', @@ -41,12 +41,12 @@ entry_points = { ]} ftp_url = None 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' mailing_list = 'python-debugger@googlegroups.com' modname = 'uncompyle6' 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/' # tracebacks in zip files are funky and not debuggable diff --git a/test/bytecode_3.5/04_async_stmt.pyc b/test/bytecode_3.5/04_async_stmt.pyc new file mode 100644 index 00000000..59e5d43d Binary files /dev/null and b/test/bytecode_3.5/04_async_stmt.pyc differ diff --git a/test/simple_source/bug35/04_async_stmt.py b/test/simple_source/bug35/04_async_stmt.py new file mode 100644 index 00000000..bc8082bf --- /dev/null +++ b/test/simple_source/bug35/04_async_stmt.py @@ -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 diff --git a/uncompyle6/main.py b/uncompyle6/main.py index a891c543..b0ca6213 100644 --- a/uncompyle6/main.py +++ b/uncompyle6/main.py @@ -217,7 +217,7 @@ def main(in_base, out_base, files, codes, outfile=None, if current_outfile: sys.stdout.write("%s\r" % status_msg(do_verify, tot_files, okay_files, failed_files, - verify_failed_files, None)) + verify_failed_files, do_verify)) sys.stdout.flush() if current_outfile: sys.stdout.write("\n") @@ -239,7 +239,7 @@ else: def status_msg(do_verify, tot_files, okay_files, failed_files, verify_failed_files, weak_verify): - if weak_verify: + if weak_verify == 'weak': verification_type = 'weak' else: verification_type = 'strong' diff --git a/uncompyle6/semantics/pysource.py b/uncompyle6/semantics/pysource.py index 4cf0fd44..dfaad6d6 100644 --- a/uncompyle6/semantics/pysource.py +++ b/uncompyle6/semantics/pysource.py @@ -441,7 +441,7 @@ class SourceWalker(GenericASTTraversal, object): if version >= 3.5: TABLE_DIRECT.update({ 'await_expr': ( 'await %c', 0), - 'await_stmt': ( '%|%c', 0), + 'await_stmt': ( '%|%c\n', 0), 'async_for_stmt': ( '%|async for %c in %c:\n%+%c%-\n\n', 9, 1, 25 ), 'async_forelse_stmt': (