[New-bugs-announce] [issue25918] AssertionError in lib2to3 on 2.7.11 Windows
Marc Schlaich
report at bugs.python.org
Mon Dec 21 05:02:07 EST 2015
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 <report at bugs.python.org>
<http://bugs.python.org/issue25918>
_______________________________________
More information about the New-bugs-announce
mailing list