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);
|
PyObject *mod = PyImport_GetModule(abs_name);
|
||||||
bool already_exists = mod != NULL;
|
bool already_exists = mod != NULL;
|
||||||
Py_XDECREF(mod);
|
Py_XDECREF(mod);
|
||||||
//if (mod != NULL) {
|
if (mod != NULL) {
|
||||||
// Py_DECREF(abs_name);
|
return PyImport_ImportModuleLevelObject(name, globals, locals, fromlist, level);
|
||||||
// return mod;
|
}
|
||||||
//}
|
|
||||||
|
|
||||||
// Check if the filter disables the lazy import
|
// Check if the filter disables the lazy import
|
||||||
PyObject *filter = LAZY_IMPORTS_FILTER(interp);
|
PyObject *filter = LAZY_IMPORTS_FILTER(interp);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue