diff --git a/test/stdlib/runtests.sh b/test/stdlib/runtests.sh index ab84ead9..2b9c0b70 100755 --- a/test/stdlib/runtests.sh +++ b/test/stdlib/runtests.sh @@ -222,6 +222,7 @@ case $PYVERSION in SKIP_TESTS=( [test_ast.py]=1 # [test_atexit.py]=1 # + [test_baseexception.py]=1 # [test_bdb.py]=1 # [test_buffer.py]=1 # parse error [test_builtin.py]=1 # parser error @@ -229,12 +230,14 @@ case $PYVERSION in [test_collections.py]=1 # Fixed I think in decompyle3 - pull from there [test_compare.py]=1 [test_compile.py]=1 + [test_configparser.py]=1 [test_contains.py]=1 # Code "while False: yield None" is optimized away in compilation [test_contextlib_async.py]=1 # Investigate [test_context.py]=1 [test_coroutines.py]=1 # Parse error + [test_crypt.py]=1 # Parse error [test_curses.py]=1 # Parse error - [test_dataclasses.py]=1 # Investigate + [test_dataclasses.py]=1 # parse error [test_datetime.py]=1 # Takes too long [test_dbm_gnu.py]=1 # Takes too long [test_decimal.py]=1 # Parse error @@ -244,6 +247,7 @@ case $PYVERSION in [test_enumerate.py]=1 # [test_enum.py]=1 # [test_faulthandler.py]=1 # takes too long + [test_generators.py]=1 # improper decompile of assert i < n and (n-i) % 3 == 0 # ... ) ;; diff --git a/uncompyle6/semantics/customize37.py b/uncompyle6/semantics/customize37.py index d356c369..a552784c 100644 --- a/uncompyle6/semantics/customize37.py +++ b/uncompyle6/semantics/customize37.py @@ -147,3 +147,16 @@ def customize_for_version37(self, version): "yield_from": ("yield from %c", (0, "expr")), } ) + + def n_importlist37(node): + if len(node) == 1: + self.default(node) + return + n = len(node) - 1 + for i in range(n, -1, -1): + if node[i] != "ROT_TWO": + break + self.template_engine(("%C", (0, i + 1, ', ')), node) + self.prune() + + self.n_importlist37 = n_importlist37 diff --git a/uncompyle6/semantics/pysource.py b/uncompyle6/semantics/pysource.py index b6c6236f..400a140c 100644 --- a/uncompyle6/semantics/pysource.py +++ b/uncompyle6/semantics/pysource.py @@ -1893,6 +1893,11 @@ class SourceWalker(GenericASTTraversal, object): self.prune() return + if node[0] == "UNPACK_SEQUENCE_0": + self.write("[]") + self.prune() + return + for n in node[1:]: if n[0].kind == "unpack": n[0].kind = "unpack_w_parens"