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.

Author vstinner
Recipients Arfrever, amaury.forgeotdarc, asvetlov, belopolsky, benjamin.peterson, brett.cannon, eric.araujo, georg.brandl, ncoghlan, pitrou, python-dev, r.david.murray, terry.reedy, vstinner
Date 2011-03-20.23:34:01
SpamBayes Score 1.5420403e-08
Marked as misclassified No
Message-id <1300664041.97.0.558784517431.issue3080@psf.upfronthosting.co.za>
In-reply-to
Content
Ok. Python 3.3 does now support non-ASCII characters in module paths and names on Windows, but only characters encodable to the ANSI code page. To support the full Unicode range, we should remove all calls to PyUnicode_EncodeFSDefault() on Windows:

  a) parse_source_module() has to encode the filename because the parser has no function expecting a filename as a Python object. It uses currently PyParser_ASTFromFile().

  b) write_compiled_module() encodes the filename to call open_exclusive(). I don't know how to implement open_exclusive() for Windows using Unicode filename: open() expects the filename as a byte string. Can we use _Py_fopen() (_wfopen)? Or do you need the O_EXCL flag?

  c) _PyImport_LoadDynamicModule() encodes the filename for _PyImport_GetDynLoadFunc(). The prototype should be changed, but only on Windows, to accept a filename as a Unicode string.

Issue #10785 is the right fix to (a). When #10785 will be fixed, it will be easier to fix #9319 crash.
History
Date User Action Args
2011-03-20 23:34:02vstinnersetrecipients: + vstinner, brett.cannon, georg.brandl, terry.reedy, amaury.forgeotdarc, ncoghlan, belopolsky, pitrou, benjamin.peterson, eric.araujo, Arfrever, r.david.murray, asvetlov, python-dev
2011-03-20 23:34:01vstinnersetmessageid: <1300664041.97.0.558784517431.issue3080@psf.upfronthosting.co.za>
2011-03-20 23:34:01vstinnerlinkissue3080 messages
2011-03-20 23:34:01vstinnercreate