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:
rocky
2018-06-22 21:06:54 -04:00
parent 6fd8d2556b
commit 1350f4c899
3 changed files with 8 additions and 5 deletions

View File

@@ -46,11 +46,9 @@ def test_grammar():
unused_rhs.add("mkfunc_annotate")
unused_rhs.add("dict_comp")
unused_rhs.add("classdefdeco1")
if PYTHON_VERSION != 3.6:
if PYTHON_VERSION in (3.5, 3.7):
expect_right_recursive.add((('l_stmts',
('lastl_stmt', 'come_froms', 'l_stmts'))))
pass
if PYTHON_VERSION in (3.5, 3.6, 3.7):
expect_right_recursive.add((('l_stmts',
('lastl_stmt', 'come_froms', 'l_stmts'))))
pass
else:
expect_right_recursive.add((('l_stmts',

View File

@@ -13,6 +13,7 @@ from xdis.bytecode import Bytecode
from xdis.main import get_opcode
opc = get_opcode(PYTHON_VERSION, IS_PYPY)
Bytecode = functools.partial(Bytecode, opc=opc)
import six
if PYTHON3:
from io import StringIO

View File

@@ -43,6 +43,10 @@ from xdis.bytecode import (
_get_const_info)
from xdis.util import code2num
from uncompyle6 import PYTHON3
if PYTHON3:
from sys import intern
from uncompyle6.scanner import Scanner, Token
class Scanner2(Scanner):