STINNER Victor <victor.stin...@haypocalc.com> 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)). The code path exists but only if filename was NULL. But I don't think that it worked because there was no call to lseek(0). The commit fixes this issue (LANG= ./python -c "import inspect). I have other issues with "LANG= ./python Lib/test/regrtest.py -v test_pydoc test_traceback" but I think that it is a new (different) issue. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue10095> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com