[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:
Antoine Pitrou 2021-03-20 20:40:18 +01:00 committed by GitHub
parent e8e341993e
commit ac17ed60f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 81 additions and 2 deletions

View file

@ -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;
}
}