You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-02 16:44:46 +08:00
Fix 3.7 aysnc def testing
This commit is contained in:
1
Makefile
1
Makefile
@@ -38,6 +38,7 @@ check-3.0 check-3.1 check-3.2 check-3.6:
|
||||
$(MAKE) -C test $@
|
||||
|
||||
check-3.7: pytest
|
||||
$(MAKE) -C test check
|
||||
|
||||
#:PyPy 2.6.1 PyPy 5.0.1, or PyPy 5.8.0-beta0
|
||||
# Skip for now
|
||||
|
Binary file not shown.
BIN
test/bytecode_3.7/04_importlist.pyc
Normal file
BIN
test/bytecode_3.7/04_importlist.pyc
Normal file
Binary file not shown.
BIN
test/bytecode_3.7/04_raise.pyc
Normal file
BIN
test/bytecode_3.7/04_raise.pyc
Normal file
Binary file not shown.
BIN
test/bytecode_3.7/04_try_finally.pyc
Normal file
BIN
test/bytecode_3.7/04_try_finally.pyc
Normal file
Binary file not shown.
BIN
test/bytecode_3.7_run/01_fstring.pyc
Normal file
BIN
test/bytecode_3.7_run/01_fstring.pyc
Normal file
Binary file not shown.
@@ -295,12 +295,17 @@ class Python36Parser(Python35Parser):
|
||||
""", nop_func)
|
||||
if self.version > 3.6:
|
||||
self.addRule("""
|
||||
expr ::= call_ex_kw3
|
||||
expr ::= call_ex_kw
|
||||
expr ::= call_ex_kw3
|
||||
expr ::= call_ex_kw4
|
||||
call_ex_kw3 ::= expr
|
||||
build_tuple_unpack_with_call
|
||||
expr
|
||||
CALL_FUNCTION_EX
|
||||
call_ex_kw4 ::= expr
|
||||
expr
|
||||
expr
|
||||
CALL_FUNCTION_EX
|
||||
call_ex_kw ::= expr expr
|
||||
build_map_unpack_with_call CALL_FUNCTION_EX
|
||||
""", nop_func)
|
||||
|
@@ -350,7 +350,7 @@ def customize_for_version3(self, version):
|
||||
self.n_call = n_call
|
||||
|
||||
def n_function_def(node):
|
||||
if self.version == 3.6:
|
||||
if self.version >= 3.6:
|
||||
code_node = node[0][0]
|
||||
else:
|
||||
code_node = node[0][1]
|
||||
@@ -634,7 +634,8 @@ def customize_for_version3(self, version):
|
||||
if kwargs == 'expr':
|
||||
kwargs = kwargs[0]
|
||||
call_function_ex = node[-1]
|
||||
assert call_function_ex == 'CALL_FUNCTION_EX_KW'
|
||||
assert (call_function_ex == 'CALL_FUNCTION_EX_KW'
|
||||
or (self.version >= 3.6 and call_function_ex == 'CALL_FUNCTION_EX'))
|
||||
# FIXME: decide if the below test be on kwargs == 'dict'
|
||||
if (call_function_ex.attr & 1 and
|
||||
(not isinstance(kwargs, Token) and kwargs != 'attribute')
|
||||
|
Reference in New Issue
Block a user