From: Victor Stinner Date: Fri, 15 Oct 2010 22:46:07 +0000 (+0000) Subject: Fix imp_cache_from_source(): Decode make_compiled_pathname() result from the X-Git-Tag: v3.2a4~541 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=88bd891e6c536cec0b53d2a52115f44f8498c331;p=thirdparty%2FPython%2Fcpython.git Fix imp_cache_from_source(): Decode make_compiled_pathname() result from the filesystem encoding instead of utf-8. imp_cache_from_source() encodes the input path to filesystem encoding and this path is passed to make_compiled_pathname(). --- diff --git a/Python/import.c b/Python/import.c index 857529370f97..94363deae021 100644 --- a/Python/import.c +++ b/Python/import.c @@ -3483,7 +3483,7 @@ imp_cache_from_source(PyObject *self, PyObject *args, PyObject *kws) PyErr_Format(PyExc_SystemError, "path buffer too short"); return NULL; } - return PyUnicode_FromString(buf); + return PyUnicode_DecodeFSDefault(buf); } PyDoc_STRVAR(doc_cache_from_source,