You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 01:09:52 +08:00
Forge on with 3.7
This commit is contained in:
@@ -2,11 +2,11 @@ PHONY=check clean dist distclean test test-unit test-functional rmChangeLog clea
|
|||||||
check-bytecode-1.5 check-bytecode-1 check-bytecode-2 check-bytecode-3 \
|
check-bytecode-1.5 check-bytecode-1 check-bytecode-2 check-bytecode-3 \
|
||||||
check-bytecode-2.2 check-byteocde-2.3 check-bytecode-2.4 \
|
check-bytecode-2.2 check-byteocde-2.3 check-bytecode-2.4 \
|
||||||
check-short check-2.6 check-2.7 check-3.0 check-3.1 check-3.2 check-3.3 \
|
check-short check-2.6 check-2.7 check-3.0 check-3.1 check-3.2 check-3.3 \
|
||||||
check-3.4 check-3.5 check-5.6 5.6 5.8 \
|
check-3.4 check-3.5 check-3.6 check-3.7 check-5.6 5.6 5.8 \
|
||||||
grammar-coverage-2.5 grammar-coverage-2.6 grammar-coverage-2.7 \
|
grammar-coverage-2.5 grammar-coverage-2.6 grammar-coverage-2.7 \
|
||||||
grammar-coverage-3.1 grammar-coverage-3.2 grammar-coverage-3.3 \
|
grammar-coverage-3.1 grammar-coverage-3.2 grammar-coverage-3.3 \
|
||||||
grammar-coverage-3.4 grammar-coverage-3.5 grammar-coverage-3.6
|
grammar-coverage-3.4 grammar-coverage-3.5 grammar-coverage-3.6 \
|
||||||
|
grammar-coverage-3.7
|
||||||
|
|
||||||
GIT2CL ?= git2cl
|
GIT2CL ?= git2cl
|
||||||
PYTHON ?= python
|
PYTHON ?= python
|
||||||
@@ -63,6 +63,10 @@ check-3.5: check-bytecode
|
|||||||
check-3.6: check-bytecode
|
check-3.6: check-bytecode
|
||||||
$(PYTHON) test_pythonlib.py --bytecode-3.6 --weak-verify $(COMPILE)
|
$(PYTHON) test_pythonlib.py --bytecode-3.6 --weak-verify $(COMPILE)
|
||||||
|
|
||||||
|
#: Run working tests from Python 3.7
|
||||||
|
check-3.7: check-bytecode
|
||||||
|
$(PYTHON) test_pythonlib.py --bytecode-3.7 --weak-verify $(COMPILE)
|
||||||
|
|
||||||
# FIXME
|
# FIXME
|
||||||
#: this is called when running under pypy3.5-5.8.0 or pypy2-5.6.0
|
#: this is called when running under pypy3.5-5.8.0 or pypy2-5.6.0
|
||||||
5.8 5.6:
|
5.8 5.6:
|
||||||
@@ -229,6 +233,10 @@ check-bytecode-3.6:
|
|||||||
$(PYTHON) test_pythonlib.py --bytecode-3.6 --weak-verify
|
$(PYTHON) test_pythonlib.py --bytecode-3.6 --weak-verify
|
||||||
$(PYTHON) test_pythonlib.py --bytecode-3.6-run --verify-run
|
$(PYTHON) test_pythonlib.py --bytecode-3.6-run --verify-run
|
||||||
|
|
||||||
|
#: Check deparsing Python 3.7
|
||||||
|
check-bytecode-3.7:
|
||||||
|
$(PYTHON) test_pythonlib.py --bytecode-3.7 --weak-verify
|
||||||
|
|
||||||
#: short tests for bytecodes only for this version of Python
|
#: short tests for bytecodes only for this version of Python
|
||||||
check-native-short:
|
check-native-short:
|
||||||
$(PYTHON) test_pythonlib.py --bytecode-$(PYTHON_VERSION) --weak-verify $(COMPILE)
|
$(PYTHON) test_pythonlib.py --bytecode-$(PYTHON_VERSION) --weak-verify $(COMPILE)
|
||||||
|
@@ -81,7 +81,7 @@ for vers in (2.7, 3.4, 3.5, 3.6):
|
|||||||
for vers in (1.5,
|
for vers in (1.5,
|
||||||
2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7,
|
2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7,
|
||||||
3.0, 3.1, 3.2, 3.3,
|
3.0, 3.1, 3.2, 3.3,
|
||||||
3.4, 3.5, 3.6, 'pypy3.2', 'pypy2.7'):
|
3.4, 3.5, 3.6, 3.7, 'pypy3.2', 'pypy2.7'):
|
||||||
bytecode = "bytecode_%s" % vers
|
bytecode = "bytecode_%s" % vers
|
||||||
key = "bytecode-%s" % vers
|
key = "bytecode-%s" % vers
|
||||||
test_options[key] = (bytecode, PYC, bytecode, vers)
|
test_options[key] = (bytecode, PYC, bytecode, vers)
|
||||||
|
@@ -177,6 +177,8 @@ class Python36Parser(Python35Parser):
|
|||||||
'expr32 ' * int((v//32) % 32) +
|
'expr32 ' * int((v//32) % 32) +
|
||||||
'expr ' * (v % 32) + opname)
|
'expr ' * (v % 32) + opname)
|
||||||
self.addRule(rule, nop_func)
|
self.addRule(rule, nop_func)
|
||||||
|
rule = ('starred ::= %s %s' % ('expr ' * v, opname))
|
||||||
|
self.addRule(rule, nop_func)
|
||||||
elif opname == 'SETUP_WITH':
|
elif opname == 'SETUP_WITH':
|
||||||
rules_str = """
|
rules_str = """
|
||||||
withstmt ::= expr SETUP_WITH POP_TOP suite_stmts_opt POP_BLOCK LOAD_CONST
|
withstmt ::= expr SETUP_WITH POP_TOP suite_stmts_opt POP_BLOCK LOAD_CONST
|
||||||
|
@@ -44,6 +44,9 @@ class Python37Parser(Python36Parser):
|
|||||||
call ::= expr CALL_METHOD_0
|
call ::= expr CALL_METHOD_0
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
def customize_grammar_rules(self, tokens, customize):
|
||||||
|
super(Python37Parser, self).customize_grammar_rules(tokens, customize)
|
||||||
|
|
||||||
class Python37ParserSingle(Python37Parser, PythonParserSingle):
|
class Python37ParserSingle(Python37Parser, PythonParserSingle):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user