mirror of
https://github.com/python/cpython.git
synced 2026-04-14 15:50:50 +00:00
gh-146369: Ensure PYTHON_LAZY_IMPORTS=none overrides __lazy_modules__ (#146371)
This commit is contained in:
parent
2be147e1e7
commit
d0e66ef1c0
3 changed files with 46 additions and 1 deletions
|
|
@ -3086,7 +3086,7 @@ _PyEval_LazyImportName(PyThreadState *tstate, PyObject *builtins,
|
|||
break;
|
||||
}
|
||||
|
||||
if (!lazy) {
|
||||
if (!lazy && PyImport_GetLazyImportsMode() != PyImport_LAZY_NONE) {
|
||||
// See if __lazy_modules__ forces this to be lazy.
|
||||
lazy = check_lazy_import_compatibility(tstate, globals, name, level);
|
||||
if (lazy < 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue