STINNER Victor added the comment:
> We shouldn't need to reopen the file in the first place.
> If we already have a file handle, we can rewind it.
> Then the encoding of the file name becomes irrelevant.
Oh yes, great idea. r85476 implements this solution (use lseek(0) on
fileno(tok->fp)). Th
Martin v. Löwis added the comment:
We shouldn't need to reopen the file in the first place. If we already have a
file handle, we can rewind it. Then the encoding of the file name becomes
irrelevant.
I keep forgetting: what was the plan for deprecating the FILE* functions in the
parser interf
New submission from STINNER Victor :
It looks like the parser API (eg. PyParser_ParseFileFlagsEx,
PyParser_ASTFromFile) expects utf-8 filename: err_input() decodes the filename
from utf-8. But
Example in a non-ascii directory (/home/SHARE/SVN/py3kéŁ) and an ascii locale:
$ LANG= ./python