Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork34.1k
Open
Description
Bug report
Bug description:
The testcase is:
#coding=U7+AA0''resulting in:
$ ./python -c "import py_compile; py_compile.compile('testcase')"Sorry: SystemError: Parser/string_parser.c:286: bad argument to internal functionI gather this is because+AA0 decodes to\r in UTF-7, however,_PyTokenizer_translate_newlines is called before the codec decoding so it slips by and blows up (at least it apologizes😆). I think it could be fixed by calling_PyTokenizer_translate_newlines again after decoding if a\r is introduced, WDYT?
CPython versions tested on:
CPython main branch
Operating systems tested on:
No response