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 amaury.forgeotdarc, pitrou, vstinner
Date 2011-03-20.23:58:51
SpamBayes Score 1.8285146e-10
Marked as misclassified No
Message-id <1300665531.85.0.426527059221.issue11619@psf.upfronthosting.co.za>
In-reply-to
Content
With #3080, Python 3.3 does now manipulate module paths and names as Unicode in the import machinery. But in 3 remaining places, it does encode filenames (to the ANSI code page):


a) _PyImport_LoadDynamicModule()

It should pass directly the PyObject* (instead of a char*) to _PyImport_GetDynLoadFunc(), but only on Windows (we may change the function name for Windows). _PyImport_GetDynLoadFunc() of dynload_win.c has to be patched to use the Unicode API (eg. LoadLibraryEx => LoadLibraryExW).


b) write_compiled_module()

The problem is to implement open_exclusive() for Windows using Unicode. open_exclusive() uses open() on Windows, but open() expects the filename as a byte string. We may use _Py_fopen() (_wfopen), but this function doesn't have an option to open the file in exclusive mode (O_EXCL flag). GNU has an extension: "x" flag in the file mode, but Windows doesn't support it.

The file is passed to marshal functions like PyMarshal_WriteLongToFile(), and so the file have to be a FILE*.


c) parse_source_module()

=> covered by the issue #10785.
History
Date User Action Args
2011-03-20 23:58:51vstinnersetrecipients: + vstinner, amaury.forgeotdarc, pitrou
2011-03-20 23:58:51vstinnersetmessageid: <1300665531.85.0.426527059221.issue11619@psf.upfronthosting.co.za>
2011-03-20 23:58:51vstinnerlinkissue11619 messages
2011-03-20 23:58:51vstinnercreate