Commit a60b1fe6 authored by Victor Stinner's avatar Victor Stinner

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().
parent 945d344c
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment