You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 01:09:52 +08:00
Fix 3.4+ keyword-only parameter handling
This commit is contained in:
@@ -108,7 +108,8 @@ case $PYVERSION in
|
|||||||
|
|
||||||
[test_capi.py]=1
|
[test_capi.py]=1
|
||||||
[test_curses.py]=1 # Possibly fails on its own but not detected
|
[test_curses.py]=1 # Possibly fails on its own but not detected
|
||||||
[test test_cmd_line.py]=1 # Takes too long, maybe hangs, or looking for interactive input?
|
[test_cmd_line.py]=1 # Takes too long, maybe hangs, or looking for interactive input?
|
||||||
|
[test_compilex.py]=1 # Probably complex literals again. Investigate
|
||||||
[test_dis.py]=1 # We change line numbers - duh!
|
[test_dis.py]=1 # We change line numbers - duh!
|
||||||
[test_doctest.py]=1 # Fails on its own
|
[test_doctest.py]=1 # Fails on its own
|
||||||
[test_exceptions.py]=1
|
[test_exceptions.py]=1
|
||||||
@@ -148,9 +149,46 @@ case $PYVERSION in
|
|||||||
SKIP_TESTS[test_base64.py]=1
|
SKIP_TESTS[test_base64.py]=1
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
3.0)
|
||||||
|
SKIP_TESTS=(
|
||||||
|
[test_array.py]=1 # Handling of bytestring
|
||||||
|
[test_concurrent_futures.py]=1 # too long to run over 46 seconds by itself
|
||||||
|
[test_datetimetester.py]=1
|
||||||
|
[test_decimal.py]=1
|
||||||
|
[test_dis.py]=1 # We change line numbers - duh!
|
||||||
|
[test_fileio.py]=1
|
||||||
|
)
|
||||||
|
if (( batch )) ; then
|
||||||
|
# Fails in crontab environment?
|
||||||
|
# Figure out what's up here
|
||||||
|
SKIP_TESTS[test_exception_variations.py]=1
|
||||||
|
SKIP_TESTS[test_quopri.py]=1
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
3.1)
|
||||||
|
SKIP_TESTS=(
|
||||||
|
[test_collections.py]=1
|
||||||
|
[test_concurrent_futures.py]=1 # too long to run over 46 seconds by itself
|
||||||
|
[test_datetimetester.py]=1
|
||||||
|
[test_decimal.py]=1
|
||||||
|
[test_dis.py]=1 # We change line numbers - duh!
|
||||||
|
[test_fileio.py]=1
|
||||||
|
)
|
||||||
|
if (( batch )) ; then
|
||||||
|
# Fails in crontab environment?
|
||||||
|
# Figure out what's up here
|
||||||
|
SKIP_TESTS[test_exception_variations.py]=1
|
||||||
|
SKIP_TESTS[test_quopri.py]=1
|
||||||
|
fi
|
||||||
|
;;
|
||||||
3.2)
|
3.2)
|
||||||
SKIP_TESTS=(
|
SKIP_TESTS=(
|
||||||
[test_ast.py]=1 # Look at: AssertionError: b'hi' != 'hi'
|
[test_ast.py]=1 # Look at: AssertionError: b'hi' != 'hi'
|
||||||
|
[test_cmd_line.py]=1
|
||||||
|
[test_collections.py]=1
|
||||||
|
[test_concurrent_futures.py]=1 # too long to run over 46 seconds by itself
|
||||||
|
[test_datetimetester.py]=1
|
||||||
|
[test_decimal.py]=1
|
||||||
[test_dis.py]=1 # We change line numbers - duh!
|
[test_dis.py]=1 # We change line numbers - duh!
|
||||||
[test_quopri.py]=1 # TypeError: Can't convert 'bytes' object to str implicitly
|
[test_quopri.py]=1 # TypeError: Can't convert 'bytes' object to str implicitly
|
||||||
)
|
)
|
||||||
@@ -176,7 +214,11 @@ case $PYVERSION in
|
|||||||
|
|
||||||
3.4)
|
3.4)
|
||||||
SKIP_TESTS=(
|
SKIP_TESTS=(
|
||||||
|
[test_asynchat.py]=1 #
|
||||||
|
[test_asyncore.py]=1 #
|
||||||
[test_atexit.py]=1 #
|
[test_atexit.py]=1 #
|
||||||
|
[test_bdb.py]=1 #
|
||||||
|
[test_binascii]=1
|
||||||
[test_dis.py]=1 # We change line numbers - duh!
|
[test_dis.py]=1 # We change line numbers - duh!
|
||||||
)
|
)
|
||||||
if (( batch )) ; then
|
if (( batch )) ; then
|
||||||
@@ -188,7 +230,7 @@ case $PYVERSION in
|
|||||||
;;
|
;;
|
||||||
3.5)
|
3.5)
|
||||||
SKIP_TESTS=(
|
SKIP_TESTS=(
|
||||||
[test_ast.py]=1 #
|
[test_ast.py]=1 # line 379, in test_literal_eval self.assertEqual(ast.literal_eval('b"hi"'), 'hi')
|
||||||
[test_atexit.py]=1 #
|
[test_atexit.py]=1 #
|
||||||
[test_builtin.py]=1 #
|
[test_builtin.py]=1 #
|
||||||
[test_compare.py]=1
|
[test_compare.py]=1
|
||||||
|
@@ -135,8 +135,8 @@ def do_tests(
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
if len(files) > max_files:
|
if len(files) > max_files:
|
||||||
files = [file for file in files if not "site-packages" in file]
|
files = [file for file in files if not "site-packages" in file and (file.endswith(".pyo") or file.endswith(".pyc"))]
|
||||||
files = [file for file in files if not "test" in file]
|
files = [file for file in files if not "test" in file and (file.endswith(".pyo") or file.endswith(".pyc"))]
|
||||||
if len(files) > max_files:
|
if len(files) > max_files:
|
||||||
# print("Number of files %d - truncating to last 200" % len(files))
|
# print("Number of files %d - truncating to last 200" % len(files))
|
||||||
print(
|
print(
|
||||||
|
@@ -587,7 +587,7 @@ def make_function3(self, node, is_lambda, nested=1, code_node=None):
|
|||||||
ends_in_comma = True
|
ends_in_comma = True
|
||||||
|
|
||||||
kw_args = [None] * kwonlyargcount
|
kw_args = [None] * kwonlyargcount
|
||||||
kw_nodes = node[0]
|
kw_nodes = node[args_node.attr[0]]
|
||||||
if kw_nodes == "kwargs":
|
if kw_nodes == "kwargs":
|
||||||
for n in kw_nodes:
|
for n in kw_nodes:
|
||||||
name = eval(n[0].pattr)
|
name = eval(n[0].pattr)
|
||||||
|
Reference in New Issue
Block a user