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().
This commit is contained in:
parent
1a5630326f
commit
88bd891e6c
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue