Skip to content

Commit 30be4e1

Browse files
committed
Use lazy_import_path, not _name, when discarding from sys.lazy_modules
Only the root is now resolved.
1 parent e612bf3 commit 30be4e1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎Objects/lazyimportobject.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ lazy_import_resolve_impl(PyThreadState *tstate, PyObject *lazy_import,
528528
}
529529
assert(obj == NULL || !PyLazyImport_CheckExact(obj));
530530
if (obj != NULL) {
531-
PyObject *name = lazy_import_name(lz);
531+
PyObject *name = lazy_import_path(lz);
532532
if (name == NULL ||
533533
_PyImport_DiscardLazyModule(tstate->interp, name) < 0) {
534534
Py_CLEAR(obj);

0 commit comments

Comments
 (0)