mirror of
https://github.com/python/cpython.git
synced 2025-07-12 22:05:16 +00:00
Issues #13959, 14647: Re-implement imp.reload() in Lib/imp.py.
Thanks to Eric Snow for the patch.
This commit is contained in:
parent
1fc3ec91cc
commit
62228dbd6c
6 changed files with 45 additions and 106 deletions
|
@ -314,9 +314,6 @@ Py_InitializeEx(int install_sigs)
|
|||
interp->modules = PyDict_New();
|
||||
if (interp->modules == NULL)
|
||||
Py_FatalError("Py_Initialize: can't make modules dictionary");
|
||||
interp->modules_reloading = PyDict_New();
|
||||
if (interp->modules_reloading == NULL)
|
||||
Py_FatalError("Py_Initialize: can't make modules_reloading dictionary");
|
||||
|
||||
/* Init Unicode implementation; relies on the codec registry */
|
||||
if (_PyUnicode_Init() < 0)
|
||||
|
@ -680,7 +677,6 @@ Py_NewInterpreter(void)
|
|||
/* XXX The following is lax in error checking */
|
||||
|
||||
interp->modules = PyDict_New();
|
||||
interp->modules_reloading = PyDict_New();
|
||||
|
||||
bimod = _PyImport_FindBuiltin("builtins");
|
||||
if (bimod != NULL) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue