You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
Some bugs...
Python 3 compiling Python 2 tolerance. Fixes issue #180. pytest test_grammar.py and validate.py fixes for 3.6 testing
This commit is contained in:
@@ -46,11 +46,9 @@ def test_grammar():
|
|||||||
unused_rhs.add("mkfunc_annotate")
|
unused_rhs.add("mkfunc_annotate")
|
||||||
unused_rhs.add("dict_comp")
|
unused_rhs.add("dict_comp")
|
||||||
unused_rhs.add("classdefdeco1")
|
unused_rhs.add("classdefdeco1")
|
||||||
if PYTHON_VERSION != 3.6:
|
if PYTHON_VERSION in (3.5, 3.6, 3.7):
|
||||||
if PYTHON_VERSION in (3.5, 3.7):
|
expect_right_recursive.add((('l_stmts',
|
||||||
expect_right_recursive.add((('l_stmts',
|
('lastl_stmt', 'come_froms', 'l_stmts'))))
|
||||||
('lastl_stmt', 'come_froms', 'l_stmts'))))
|
|
||||||
pass
|
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
expect_right_recursive.add((('l_stmts',
|
expect_right_recursive.add((('l_stmts',
|
||||||
|
@@ -13,6 +13,7 @@ from xdis.bytecode import Bytecode
|
|||||||
from xdis.main import get_opcode
|
from xdis.main import get_opcode
|
||||||
opc = get_opcode(PYTHON_VERSION, IS_PYPY)
|
opc = get_opcode(PYTHON_VERSION, IS_PYPY)
|
||||||
Bytecode = functools.partial(Bytecode, opc=opc)
|
Bytecode = functools.partial(Bytecode, opc=opc)
|
||||||
|
import six
|
||||||
|
|
||||||
if PYTHON3:
|
if PYTHON3:
|
||||||
from io import StringIO
|
from io import StringIO
|
||||||
|
@@ -43,6 +43,10 @@ from xdis.bytecode import (
|
|||||||
_get_const_info)
|
_get_const_info)
|
||||||
from xdis.util import code2num
|
from xdis.util import code2num
|
||||||
|
|
||||||
|
from uncompyle6 import PYTHON3
|
||||||
|
if PYTHON3:
|
||||||
|
from sys import intern
|
||||||
|
|
||||||
from uncompyle6.scanner import Scanner, Token
|
from uncompyle6.scanner import Scanner, Token
|
||||||
|
|
||||||
class Scanner2(Scanner):
|
class Scanner2(Scanner):
|
||||||
|
Reference in New Issue
Block a user