mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
Re-enable eagerly returning imported module
This commit is contained in:
parent
9be59ecebd
commit
b179da2cf5
1 changed files with 3 additions and 4 deletions
|
|
@ -4256,10 +4256,9 @@ _PyImport_LazyImportModuleLevelObject(PyThreadState *tstate,
|
|||
PyObject *mod = PyImport_GetModule(abs_name);
|
||||
bool already_exists = mod != NULL;
|
||||
Py_XDECREF(mod);
|
||||
//if (mod != NULL) {
|
||||
// Py_DECREF(abs_name);
|
||||
// return mod;
|
||||
//}
|
||||
if (mod != NULL) {
|
||||
return PyImport_ImportModuleLevelObject(name, globals, locals, fromlist, level);
|
||||
}
|
||||
|
||||
// Check if the filter disables the lazy import
|
||||
PyObject *filter = LAZY_IMPORTS_FILTER(interp);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue