New submission from Marc Schlaich: This simple test case results in a lib2to3 crash with an AssertionError in 2.7.11
source = ''' class Test(object): tests = [] ''' from lib2to3.refactor import RefactoringTool def main(): tool = RefactoringTool([]) tool.refactor_string(source, '') Exception: Traceback (most recent call last): File "test.py", line 21, in <module> main() File "test.py", line 16, in main tool.refactor_string(source, '') File "c:\Python27\Lib\lib2to3\refactor.py", line 380, in refactor_string name, err.__class__.__name__, err) File "c:\Python27\Lib\lib2to3\refactor.py", line 377, in refactor_string tree = self.driver.parse_string(data) File "c:\Python27\Lib\lib2to3\pgen2\driver.py", line 106, in parse_string return self.parse_tokens(tokens, debug) File "c:\Python27\Lib\lib2to3\pgen2\driver.py", line 71, in parse_tokens if p.addtoken(type, value, (prefix, start)): File "c:\Python27\Lib\lib2to3\pgen2\parse.py", line 127, in addtoken assert t < 256 AssertionError Pretty weird: A manually built Python 2.7.11 with VS 2008 doesn't show this issue. ---------- components: 2to3 (2.x to 3.x conversion tool) messages: 256790 nosy: schlamar priority: normal severity: normal status: open title: AssertionError in lib2to3 on 2.7.11 Windows type: crash versions: Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25918> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com