mirror of
https://github.com/python/cpython.git
synced 2025-08-24 18:55:00 +00:00
[3.9] bpo-43517: Fix false positive in detection of circular imports (GH-24895) (GH-24948)
(cherry picked from commit 2fd16ef406
)
Co-authored-by: Antoine Pitrou <antoine@python.org>
Automerge-Triggered-By: GH:pitrou
This commit is contained in:
parent
e8e341993e
commit
ac17ed60f2
5 changed files with 81 additions and 2 deletions
|
@ -1863,7 +1863,7 @@ PyImport_ImportModuleLevelObject(PyObject *name, PyObject *globals,
|
|||
}
|
||||
|
||||
if (mod != NULL && mod != Py_None) {
|
||||
if (import_ensure_initialized(tstate, mod, name) < 0) {
|
||||
if (import_ensure_initialized(tstate, mod, abs_name) < 0) {
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue