Skip to content

Commit a97cc10

Browse files
committed
gh-152298: Keep pending lazy owners unfinalized
1 parent 2b013d8 commit a97cc10

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Objects/lazyimportobject.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,8 @@ finalize_owner_if_matches(PyThreadState *tstate, PyLazyImportObject *m,
220220
int finalized = 0;
221221
PyInterpreterState *interp = tstate->interp;
222222
_PyImport_AcquireLock(interp);
223-
if (!m->lz_owner_finalized &&
223+
if (!m->lz_owner_pending &&
224+
!m->lz_owner_finalized &&
224225
owner_matches(m, globals, name))
225226
{
226227
m->lz_owner_finalized = 1;

0 commit comments

Comments
 (0)