mirror of
https://github.com/python/cpython.git
synced 2025-09-11 19:27:07 +00:00
Lib/imp.py for imp.source_from_cache() instead of its own C version. Also change PyImport_ExecCodeModuleObject() to not infer the source path from the bytecode path like PyImport_ExecCodeModuleWithPathnames() does. This makes the function less magical. This also has the side-effect of removing all uses of MAXPATHLEN in Python/import.c which can cause failures on really long filenames.
This commit is contained in:
parent
d104eef118
commit
a6473f9cfd
6 changed files with 4086 additions and 4065 deletions
|
@ -163,9 +163,14 @@ Importing Modules
|
|||
.. c:function:: PyObject* PyImport_ExecCodeModuleWithPathnames(char *name, PyObject *co, char *pathname, char *cpathname)
|
||||
|
||||
Like :c:func:`PyImport_ExecCodeModuleObject`, but *name*, *pathname* and
|
||||
*cpathname* are UTF-8 encoded strings.
|
||||
*cpathname* are UTF-8 encoded strings. Attempts are also made to figure out
|
||||
what the value for *pathname* should be from *cpathname* if the former is
|
||||
set to ``NULL``.
|
||||
|
||||
.. versionadded:: 3.2
|
||||
.. versionchanged:: 3.3
|
||||
Uses :func:`imp.source_from_cache()` in calculating the source path if
|
||||
only the bytecode path is provided.
|
||||
|
||||
|
||||
.. c:function:: long PyImport_GetMagicNumber()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue