You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 01:09:52 +08:00
Merge branch 'master' into python-2.4
This commit is contained in:
BIN
test/bytecode_3.3_run/03_if_elif.pyc
Normal file
BIN
test/bytecode_3.3_run/03_if_elif.pyc
Normal file
Binary file not shown.
BIN
test/bytecode_3.5_run/03_if_elif.pyc
Normal file
BIN
test/bytecode_3.5_run/03_if_elif.pyc
Normal file
Binary file not shown.
Binary file not shown.
BIN
test/bytecode_3.6_run/03_if_elif.pyc
Normal file
BIN
test/bytecode_3.6_run/03_if_elif.pyc
Normal file
Binary file not shown.
Binary file not shown.
BIN
test/bytecode_3.7_run/03_if_elif.pyc
Normal file
BIN
test/bytecode_3.7_run/03_if_elif.pyc
Normal file
Binary file not shown.
@@ -79,10 +79,12 @@ for VERSION in $PYVERSIONS ; do
|
|||||||
|
|
||||||
SUBJECT_PREFIX="pyenv weak verify (max $MAX_TESTS) for"
|
SUBJECT_PREFIX="pyenv weak verify (max $MAX_TESTS) for"
|
||||||
if ((rc == 0)); then
|
if ((rc == 0)); then
|
||||||
|
actual_versions="$actual_versions ok;"
|
||||||
tail -v $LOGFILE | mail -s "$SUBJECT_PREFIX $VERSION ok" ${USER}@localhost
|
tail -v $LOGFILE | mail -s "$SUBJECT_PREFIX $VERSION ok" ${USER}@localhost
|
||||||
else
|
else
|
||||||
|
actual_versions="$actual_versions failed;"
|
||||||
tail -v $LOGFILE | mail -s "$SUBJECT_PREFIX $VERSION not ok" ${USER}@localhost
|
tail -v $LOGFILE | mail -s "$SUBJECT_PREFIX $VERSION not ok" ${USER}@localhost
|
||||||
tail -v $LOGFILE | mail -s "$SUBJECT_PREFIX $VERSION not ok" ${EMAIL}
|
tail -v $LOGFILE | mail -s "$HOST $SUBJECT_PREFIX $VERSION not ok" ${EMAIL}
|
||||||
fi
|
fi
|
||||||
rm .python-version
|
rm .python-version
|
||||||
done
|
done
|
||||||
|
@@ -1,11 +1,13 @@
|
|||||||
# 2.6.9 symbols.py
|
# 2.6.9 symbols.py
|
||||||
# Bug in 2.6 is having multple COME_FROMs due to the
|
# Bug in 2.6 is having multple COME_FROMs due to the
|
||||||
# "and" in the "if" clause
|
# "and" in the "if" clause
|
||||||
|
|
||||||
|
# RUNNABLE
|
||||||
if __name__:
|
if __name__:
|
||||||
if __file__ and __name__:
|
if __file__ and __name__:
|
||||||
pass
|
pass
|
||||||
elif __name__:
|
elif not __name__:
|
||||||
pass
|
assert False
|
||||||
|
|
||||||
# 2.6.9 transformer.py
|
# 2.6.9 transformer.py
|
||||||
# Bug in 2.6 is multple COME_FROMs as a result
|
# Bug in 2.6 is multple COME_FROMs as a result
|
||||||
@@ -21,3 +23,20 @@ elif __file__:
|
|||||||
assert __name__ or __file__
|
assert __name__ or __file__
|
||||||
else:
|
else:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
# From 3.3.7 test_binop.py
|
||||||
|
# Bug was in ifelsestmt(c) ensuring b+=5 is not in "else"
|
||||||
|
# Also note: ifelsetmtc should not have been used since this
|
||||||
|
# this is not in a loop!
|
||||||
|
def __floordiv__(a, b):
|
||||||
|
if a:
|
||||||
|
b += 1
|
||||||
|
elif not b:
|
||||||
|
return a
|
||||||
|
b += 5
|
||||||
|
return b
|
||||||
|
|
||||||
|
assert __floordiv__(1, 1) == 7
|
||||||
|
assert __floordiv__(1, 0) == 6
|
||||||
|
assert __floordiv__(0, 3) == 8
|
||||||
|
assert __floordiv__(0, 0) == 0
|
||||||
|
@@ -1,14 +1,5 @@
|
|||||||
SKIP_TESTS=(
|
SKIP_TESTS=(
|
||||||
[test_binop.py]=1 # FIXME: Works on c90ff51 ?
|
[test_buffer.py]=1 # FIXME: Works on c90ff51
|
||||||
[test_cgi.py]=1 # FIXME: Works on c90ff51 ?
|
|
||||||
[test_buffer.py]=1 # FIXME: Works on c90ff51 ?
|
|
||||||
[test_decorators.py]=1 # FIXME: Works on c90ff51
|
|
||||||
[test_optparse.py]=1 # FIXME: Works on c90ff51
|
|
||||||
[test_os.py]=1 # FIXME: Works on c90ff51
|
|
||||||
[test_pep352.py]=1 # FIXME: Works on c90ff51 ?
|
|
||||||
[test_pyclbr.py]=1 # FIXME: Works on c90ff51 ?
|
|
||||||
[test_shutil.py]=1 # FIXME: Works on c90ff51
|
|
||||||
[test_strftime.py]=1 # FIXME: Works on c90ff51 ?
|
|
||||||
|
|
||||||
[test_atexit.py]=1 # The atexit test starting at 3.3 looks for specific comments in error lines
|
[test_atexit.py]=1 # The atexit test starting at 3.3 looks for specific comments in error lines
|
||||||
|
|
||||||
@@ -39,6 +30,7 @@ SKIP_TESTS=(
|
|||||||
|
|
||||||
[test_nntplib.py]=1
|
[test_nntplib.py]=1
|
||||||
|
|
||||||
|
[test_pep352.py]=1 # test failures
|
||||||
[test_peepholer.py]=1
|
[test_peepholer.py]=1
|
||||||
[test_poll.py]=1 # test takes too long to run: 11 seconds
|
[test_poll.py]=1 # test takes too long to run: 11 seconds
|
||||||
[test_pty.py]=1 # FIXME: Needs grammar loop isolation separation
|
[test_pty.py]=1 # FIXME: Needs grammar loop isolation separation
|
||||||
|
@@ -1,10 +1,6 @@
|
|||||||
SKIP_TESTS=(
|
SKIP_TESTS=(
|
||||||
[test_buffer.py]=1 # FIXME: Works on c90ff51 ?
|
[test_buffer.py]=1 # FIXME: Works on c90ff51
|
||||||
[test_decorators.py]=1 # FIXME: Works on c90ff51
|
[test_strftime.py]=1 # FIXME: Works on c90ff51
|
||||||
[test_optparse.py]=1 # FIXME: Works on c90ff51
|
|
||||||
[test_os.py]=1 # FIXME: Works on c90ff51
|
|
||||||
[test_shutil.py]=1 # FIXME: Works on c90ff51
|
|
||||||
[test_strftime.py]=1 # FIXME: Works on c90ff51 ?
|
|
||||||
|
|
||||||
[test___all__.py]=1 # it fails on its own
|
[test___all__.py]=1 # it fails on its own
|
||||||
[test_atexit.py]=1 # The atexit test looks for specific comments in error lines
|
[test_atexit.py]=1 # The atexit test looks for specific comments in error lines
|
||||||
|
@@ -1,17 +1,5 @@
|
|||||||
SKIP_TESTS=(
|
SKIP_TESTS=(
|
||||||
[test_buffer.py]=1 # FIXME: Works on c90ff51
|
[test_buffer.py]=1 # FIXME: Works on c90ff51
|
||||||
[test_decorators.py]=1 # FIXME: Works on c90ff51
|
|
||||||
[test_ftplib.py]=1 # FIXME: Works on c90ff51
|
|
||||||
[test_optparse.py]=1 # FIXME: Works on c90ff51
|
|
||||||
[test_os.py]=1 # FIXME: Works on c90ff51
|
|
||||||
[test_poplib.py]=1 # FIXME: Works on c90ff51?
|
|
||||||
[test_platform.py]=1 # FIXME: Works on c90ff51
|
|
||||||
[test_pyclbr.py]=1 # FIXME: Works on c90ff51
|
|
||||||
[test_shutil.py]=1 # FIXME: Works on c90ff51?
|
|
||||||
[test_strftime.py]=1 # FIXME: Works on c90ff51?
|
|
||||||
[test_sysconfig.py]=1 # FIXME: Works on c90ff51?
|
|
||||||
[test_tempfile.py]=1 # FIXME: Works on c90ff51
|
|
||||||
[test_uu.py]=1 # FIXME: Works on c90ff51
|
|
||||||
|
|
||||||
[test___all__.py]=1 # it fails on its own
|
[test___all__.py]=1 # it fails on its own
|
||||||
[test_aifc.py]=1 #
|
[test_aifc.py]=1 #
|
||||||
|
@@ -1,15 +1,12 @@
|
|||||||
SKIP_TESTS=(
|
SKIP_TESTS=(
|
||||||
[test_ast.py]=1 # FIXME: Works on c90ff51
|
[test_ast.py]=1 # FIXME: Works on c90ff51
|
||||||
[test_binop.py]=1 # FIXME: Works on c90ff51
|
|
||||||
[test_complex.py]=1 # FIXME: Works on c90ff51
|
|
||||||
[test_decorators.py]=1 # FIXME: Works on c90ff51
|
|
||||||
[test_format.py]=1 # FIXME: Works on c90ff51
|
[test_format.py]=1 # FIXME: Works on c90ff51
|
||||||
[test_ftplib.py]=1 # FIXME: Works on c90ff51
|
[test_ftplib.py]=1 # FIXME: Works on c90ff51
|
||||||
[test_slice.py]=1 # FIXME: Works on c90ff51
|
[test_slice.py]=1 # FIXME: Works on c90ff51
|
||||||
[test_sort.py]=1 # FIXME: Works on c90ff51
|
[test_sort.py]=1 # FIXME: Works on c90ff51
|
||||||
[test_strftime.py]=1 # FIXME: Works on c90ff51
|
[test_strftime.py]=1 # FIXME: Works on c90ff51
|
||||||
[test_timeit.py]=1 # FIXME: Works on c90ff51
|
[test_timeit.py]=1 # FIXME: Works on c90ff51
|
||||||
[test_os.py]=1 # FIXME: Works on c90ff51
|
[test_os.py]=1 # parse error FIXME: Works on c90ff51
|
||||||
|
|
||||||
[test___all__.py]=1 # it fails on its own
|
[test___all__.py]=1 # it fails on its own
|
||||||
[test_aifc.py]=1 #
|
[test_aifc.py]=1 #
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
SKIP_TESTS=(
|
SKIP_TESTS=(
|
||||||
[test_builtin.py]=1 # FIXME works on decompyle6
|
|
||||||
[test_context.py]=1 # FIXME works on decompyle6
|
[test_context.py]=1 # FIXME works on decompyle6
|
||||||
|
[test_doctest2.py]=1 # FIXME works on decompyle6
|
||||||
[test_format.py]=1 # FIXME works on decompyle6
|
[test_format.py]=1 # FIXME works on decompyle6
|
||||||
[test_marshal.py]=1 # FIXME works on decompyle6
|
[test_marshal.py]=1 # FIXME works on decompyle6
|
||||||
[test_normalization.py]=1 # FIXME works on decompyle6
|
[test_normalization.py]=1 # FIXME works on decompyle6
|
||||||
@@ -9,12 +9,11 @@ SKIP_TESTS=(
|
|||||||
[test_slice.py]=1 # FIXME works on decompyle6
|
[test_slice.py]=1 # FIXME works on decompyle6
|
||||||
[test_sort.py]=1 # FIXME works on decompyle6
|
[test_sort.py]=1 # FIXME works on decompyle6
|
||||||
[test_statistics.py]=1 # FIXME works on decompyle6
|
[test_statistics.py]=1 # FIXME works on decompyle6
|
||||||
[test_string_literals.py]=1 # FIXME works on decompyle6
|
|
||||||
[test_timeit.py]=1 # FIXME works on decompyle6
|
[test_timeit.py]=1 # FIXME works on decompyle6
|
||||||
[test_urllib2_localnet.py]=1 # FIXME works on decompyle6
|
[test_urllib2_localnet.py]=1 # FIXME works on decompyle6
|
||||||
[test_urllib2.py]=1 # FIXME: works on uncompyle6
|
[test_urllib2.py]=1 # FIXME: works on uncompyle6
|
||||||
[test_generators.py]=1 # Investigate improper lamdba with bogus "False" added
|
[test_generators.py]=1 # FIXME: works on uncompyle6 - lambda parsing probably
|
||||||
[test_grammar.py]=1 # investigate: like above: semantic rule missing probably
|
[test_grammar.py]=1 # FIXME: works on uncompyle6 - lambda parsing probably
|
||||||
|
|
||||||
[test___all__.py]=1 # it fails on its own
|
[test___all__.py]=1 # it fails on its own
|
||||||
[test_argparse.py]=1 #- it fails on its own
|
[test_argparse.py]=1 #- it fails on its own
|
||||||
@@ -134,6 +133,7 @@ SKIP_TESTS=(
|
|||||||
# 306 unit-test files in about 19 minutes
|
# 306 unit-test files in about 19 minutes
|
||||||
|
|
||||||
if (( batch )) ; then
|
if (( batch )) ; then
|
||||||
|
SKIP_TESTS[test_capi.py]=1 # more than 15 secs to run on POWER
|
||||||
SKIP_TESTS[test_dbm_gnu.py]=1 # fails on its own on POWER
|
SKIP_TESTS[test_dbm_gnu.py]=1 # fails on its own on POWER
|
||||||
SKIP_TESTS[test_distutils.py]=1
|
SKIP_TESTS[test_distutils.py]=1
|
||||||
SKIP_TESTS[test_fileio.py]=1
|
SKIP_TESTS[test_fileio.py]=1
|
||||||
|
@@ -59,13 +59,22 @@ for VERSION in $PYVERSIONS ; do
|
|||||||
else
|
else
|
||||||
STOP_ONERROR=1 /bin/bash $DEBUG ./runtests.sh >$LOGFILE 2>&1
|
STOP_ONERROR=1 /bin/bash $DEBUG ./runtests.sh >$LOGFILE 2>&1
|
||||||
rc=$?
|
rc=$?
|
||||||
|
|
||||||
|
echo Python Version $(pyenv local) >> $LOGFILE
|
||||||
|
echo "" >>$LOGFILE
|
||||||
|
typeset -i ALL_FILES_ENDTIME=$(date +%s)
|
||||||
|
(( time_diff = ALL_FILES_ENDTIME - ALL_FILES_STARTTIME))
|
||||||
|
displaytime $time_diff >> $LOGFILE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
SUBJECT_PREFIX="runtests verify for"
|
SUBJECT_PREFIX="runtests verify for"
|
||||||
if ((rc == 0)); then
|
if ((rc == 0)); then
|
||||||
|
actual_versions="$actual_versions ok;"
|
||||||
tail -v $LOGFILE | mail -s "$SUBJECT_PREFIX $VERSION ok" ${USER}@localhost
|
tail -v $LOGFILE | mail -s "$SUBJECT_PREFIX $VERSION ok" ${USER}@localhost
|
||||||
else
|
else
|
||||||
|
actual_versions="$actual_versions failed;"
|
||||||
tail -v $LOGFILE | mail -s "$SUBJECT_PREFIX $VERSION not ok" ${USER}@localhost
|
tail -v $LOGFILE | mail -s "$SUBJECT_PREFIX $VERSION not ok" ${USER}@localhost
|
||||||
tail -v $LOGFILE | mail -s "$SUBJECT_PREFIX $VERSION not ok" $EMAIL
|
tail -v $LOGFILE | mail -s "$HOST $SUBJECT_PREFIX $VERSION not ok" $EMAIL
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@@ -33,13 +33,23 @@ IFELSE_STMT_RULES = frozenset(
|
|||||||
"else_suitec",
|
"else_suitec",
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
(
|
||||||
|
"ifelsestmtc",
|
||||||
|
(
|
||||||
|
"testexpr",
|
||||||
|
"c_stmts_opt",
|
||||||
|
"jump_forward_else",
|
||||||
|
"else_suitec",
|
||||||
|
"\\e__come_froms",
|
||||||
|
),
|
||||||
|
),
|
||||||
(
|
(
|
||||||
"ifelsestmtc",
|
"ifelsestmtc",
|
||||||
(
|
(
|
||||||
"testexpr",
|
"testexpr",
|
||||||
"c_stmts_opt",
|
"c_stmts_opt",
|
||||||
"jump_absolute_else",
|
"jump_absolute_else",
|
||||||
"else_suitec"
|
"else_suitec",
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
@@ -94,6 +104,7 @@ def ifelsestmt(self, lhs, n, rule, ast, tokens, first, last):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
if rule not in IFELSE_STMT_RULES:
|
if rule not in IFELSE_STMT_RULES:
|
||||||
|
# print("XXX", rule)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
# Avoid if/else where the "then" is a "raise_stmt1" for an
|
# Avoid if/else where the "then" is a "raise_stmt1" for an
|
||||||
|
@@ -132,7 +132,7 @@ class TreeTransform(GenericASTTraversal, object):
|
|||||||
|
|
||||||
if stmts in ("c_stmts", "stmts", "stmts_opt") and len(stmts) == 1:
|
if stmts in ("c_stmts", "stmts", "stmts_opt") and len(stmts) == 1:
|
||||||
raise_stmt = stmts[0]
|
raise_stmt = stmts[0]
|
||||||
if raise_stmt != "raise_stmt1":
|
if raise_stmt != "raise_stmt1" and len(raise_stmt) > 0:
|
||||||
raise_stmt = raise_stmt[0]
|
raise_stmt = raise_stmt[0]
|
||||||
|
|
||||||
testtrue_or_false = testexpr[0]
|
testtrue_or_false = testexpr[0]
|
||||||
@@ -147,17 +147,15 @@ class TreeTransform(GenericASTTraversal, object):
|
|||||||
assert_expr = testtrue_or_false[0]
|
assert_expr = testtrue_or_false[0]
|
||||||
jump_cond = NoneToken
|
jump_cond = NoneToken
|
||||||
else:
|
else:
|
||||||
try:
|
assert testtrue_or_false in ("testfalse", "testfalsel")
|
||||||
assert testtrue_or_false in ("testfalse", "testfalsel")
|
|
||||||
except:
|
|
||||||
from trepan.api import debug; debug()
|
|
||||||
assert_expr = testtrue_or_false[0]
|
assert_expr = testtrue_or_false[0]
|
||||||
if assert_expr == "testfalse_not_and":
|
if assert_expr in ("testfalse_not_and", "and_not"):
|
||||||
# FIXME: come pack to stuff like this
|
# FIXME: come back to stuff like this
|
||||||
return node
|
return node
|
||||||
|
|
||||||
jump_cond = testtrue_or_false[1]
|
jump_cond = testtrue_or_false[1]
|
||||||
assert_expr.kind = "assert_expr"
|
assert_expr.kind = "assert_expr"
|
||||||
|
pass
|
||||||
|
|
||||||
expr = raise_stmt[0]
|
expr = raise_stmt[0]
|
||||||
RAISE_VARARGS_1 = raise_stmt[1]
|
RAISE_VARARGS_1 = raise_stmt[1]
|
||||||
@@ -257,6 +255,7 @@ class TreeTransform(GenericASTTraversal, object):
|
|||||||
|
|
||||||
where appropriate.
|
where appropriate.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
else_suite = node[3]
|
else_suite = node[3]
|
||||||
|
|
||||||
n = else_suite[0]
|
n = else_suite[0]
|
||||||
|
Reference in New Issue
Block a user