mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
bpo-1635741: Convert _imp to multi-phase init (GH-23378)
Convert the _imp extension module to the multi-phase initialization API (PEP 489). * Add _PyImport_BootstrapImp() which fix a bootstrap issue: import the _imp module before importlib is initialized. * Add create_builtin() sub-function, used by _imp_create_builtin(). * Initialize PyInterpreterState.import_func earlier, in pycore_init_builtins(). * Remove references to _PyImport_Cleanup(). This function has been renamed to finalize_modules() and moved to pylifecycle.c.
This commit is contained in:
parent
e0251787d8
commit
6223071421
4 changed files with 134 additions and 93 deletions
|
@ -14501,7 +14501,7 @@ os__remove_dll_directory_impl(PyObject *module, PyObject *cookie)
|
|||
|
||||
os.waitstatus_to_exitcode() is implemented in C and not in Python, so
|
||||
subprocess can safely call it during late Python finalization without
|
||||
risking that used os attributes were set to None by _PyImport_Cleanup(). */
|
||||
risking that used os attributes were set to None by finalize_modules(). */
|
||||
#if defined(WIFEXITED) || defined(MS_WINDOWS)
|
||||
/*[clinic input]
|
||||
os.waitstatus_to_exitcode
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue