Message256790
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. |
|
Date |
User |
Action |
Args |
2015-12-21 10:02:07 | schlamar | set | recipients:
+ schlamar |
2015-12-21 10:02:07 | schlamar | set | messageid: <1450692127.84.0.492153161721.issue25918@psf.upfronthosting.co.za> |
2015-12-21 10:02:07 | schlamar | link | issue25918 messages |
2015-12-21 10:02:07 | schlamar | create | |
|