This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

作者 vstinner
收信人 benjamin.peterson, terry.reedy, vstinner
日期 2010-10-15.22:58:11
SpamBayes Score 3.1318246e-05
Marked as misclassified
Message-id <1287183496.13.0.656008419995.issue10114@psf.upfronthosting.co.za>
In-reply-to
内容
> All filenames should use the filesystem encoding in Python.

Here is a new patch [code_encoding.patch] implementing this idea:

 - Use filesystem encoding (and surrogateescape) to encode/decode paths in compile() and the parser, instead of utf-8 in strict mode
 - Ensure that co_filename attribute can be used as a filename (eg. to not raise UnicodeEncodeError on Linux)
 - compile() builtin supports bytes filenames
 - _Py_FindSourceFile() (traceback.c) encodes paths of sys.path into the filesystem encoding, as do find_module() (import.c)
 - PyRun_SimpleFileExFlags() sets __file__ attribute using the filesystem encoding

The patch restores the situation before #6543.
历史
日期 用户 动作 参数
2010-10-15 22:58:16vstinner修改recipients: + vstinner, terry.reedy, benjamin.peterson
2010-10-15 22:58:16vstinner修改messageid: <1287183496.13.0.656008419995.issue10114@psf.upfronthosting.co.za>
2010-10-15 22:58:13vstinner链接issue10114 messages
2010-10-15 22:58:13vstinner创建