mirror of
https://github.com/python/cpython.git
synced 2025-08-27 20:25:18 +00:00
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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue