You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 08:49:51 +08:00
3.7+ imports yet again
This commit is contained in:
@@ -222,6 +222,7 @@ case $PYVERSION in
|
|||||||
SKIP_TESTS=(
|
SKIP_TESTS=(
|
||||||
[test_ast.py]=1 #
|
[test_ast.py]=1 #
|
||||||
[test_atexit.py]=1 #
|
[test_atexit.py]=1 #
|
||||||
|
[test_baseexception.py]=1 #
|
||||||
[test_bdb.py]=1 #
|
[test_bdb.py]=1 #
|
||||||
[test_buffer.py]=1 # parse error
|
[test_buffer.py]=1 # parse error
|
||||||
[test_builtin.py]=1 # parser 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_collections.py]=1 # Fixed I think in decompyle3 - pull from there
|
||||||
[test_compare.py]=1
|
[test_compare.py]=1
|
||||||
[test_compile.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_contains.py]=1 # Code "while False: yield None" is optimized away in compilation
|
||||||
[test_contextlib_async.py]=1 # Investigate
|
[test_contextlib_async.py]=1 # Investigate
|
||||||
[test_context.py]=1
|
[test_context.py]=1
|
||||||
[test_coroutines.py]=1 # Parse error
|
[test_coroutines.py]=1 # Parse error
|
||||||
|
[test_crypt.py]=1 # Parse error
|
||||||
[test_curses.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_datetime.py]=1 # Takes too long
|
||||||
[test_dbm_gnu.py]=1 # Takes too long
|
[test_dbm_gnu.py]=1 # Takes too long
|
||||||
[test_decimal.py]=1 # Parse error
|
[test_decimal.py]=1 # Parse error
|
||||||
@@ -244,6 +247,7 @@ case $PYVERSION in
|
|||||||
[test_enumerate.py]=1 #
|
[test_enumerate.py]=1 #
|
||||||
[test_enum.py]=1 #
|
[test_enum.py]=1 #
|
||||||
[test_faulthandler.py]=1 # takes too long
|
[test_faulthandler.py]=1 # takes too long
|
||||||
|
[test_generators.py]=1 # improper decompile of assert i < n and (n-i) % 3 == 0
|
||||||
# ...
|
# ...
|
||||||
)
|
)
|
||||||
;;
|
;;
|
||||||
|
@@ -147,3 +147,16 @@ def customize_for_version37(self, version):
|
|||||||
"yield_from": ("yield from %c", (0, "expr")),
|
"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
|
||||||
|
@@ -1893,6 +1893,11 @@ class SourceWalker(GenericASTTraversal, object):
|
|||||||
self.prune()
|
self.prune()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if node[0] == "UNPACK_SEQUENCE_0":
|
||||||
|
self.write("[]")
|
||||||
|
self.prune()
|
||||||
|
return
|
||||||
|
|
||||||
for n in node[1:]:
|
for n in node[1:]:
|
||||||
if n[0].kind == "unpack":
|
if n[0].kind == "unpack":
|
||||||
n[0].kind = "unpack_w_parens"
|
n[0].kind = "unpack_w_parens"
|
||||||
|
Reference in New Issue
Block a user