Message131571
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. |
|
Date |
User |
Action |
Args |
2011-03-20 23:34:02 | vstinner | set | recipients:
+ 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:01 | vstinner | set | messageid: <1300664041.97.0.558784517431.issue3080@psf.upfronthosting.co.za> |
2011-03-20 23:34:01 | vstinner | link | issue3080 messages |
2011-03-20 23:34:01 | vstinner | create | |
|