Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
gh-150374: Fix double release of import lock in lazy import reificati…
…on (GH-150376)

(cherry picked from commit 5498eba)

Co-authored-by: pengyu lee <lipengyu@kylinos.cn>
  • Loading branch information
lpyu001 authored and miss-islington committed May 25, 2026
commit df0ee76be2e27300e97f9937d1a87d3271933fb4
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix double release of the import lock on lazy import reification errors.
1 change: 0 additions & 1 deletion Python/import.c
Original file line number Diff line number Diff line change
Expand Up @@ -3934,7 +3934,6 @@ _PyImport_LoadLazyImportTstate(PyThreadState *tstate, PyObject *lazy_import)
return NULL;
}
else if (PySet_Add(importing, lazy_import) < 0) {
_PyImport_ReleaseLock(interp);
goto error;
}

Expand Down
Loading