From 915e7820331b541dc703fe28339479d6c05ef1c6 Mon Sep 17 00:00:00 2001 From: lipengyu Date: Mon, 25 May 2026 15:21:21 +0800 Subject: [PATCH 1/2] Fix double release of import lock in lazy import reification --- Python/import.c | 1 - 1 file changed, 1 deletion(-) diff --git a/Python/import.c b/Python/import.c index 91164bc8043b22..3e470d2c22cfbd 100644 --- a/Python/import.c +++ b/Python/import.c @@ -3928,7 +3928,6 @@ _PyImport_LoadLazyImportTstate(PyThreadState *tstate, PyObject *lazy_import) return NULL; } else if (PySet_Add(importing, lazy_import) < 0) { - _PyImport_ReleaseLock(interp); goto error; } From e47d0b90f059bd05eb170c92d2628fa546fbc4f0 Mon Sep 17 00:00:00 2001 From: lipengyu Date: Mon, 25 May 2026 16:02:37 +0800 Subject: [PATCH 2/2] add NEWS entry --- .../2026-05-25-16-00-22.gh-issue-150374.Emu6d8.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/Core_and_Builtins/2026-05-25-16-00-22.gh-issue-150374.Emu6d8.rst diff --git a/Misc/NEWS.d/next/Core_and_Builtins/2026-05-25-16-00-22.gh-issue-150374.Emu6d8.rst b/Misc/NEWS.d/next/Core_and_Builtins/2026-05-25-16-00-22.gh-issue-150374.Emu6d8.rst new file mode 100644 index 00000000000000..7189ca186d2b7e --- /dev/null +++ b/Misc/NEWS.d/next/Core_and_Builtins/2026-05-25-16-00-22.gh-issue-150374.Emu6d8.rst @@ -0,0 +1 @@ +Fix double release of the import lock on lazy import reification errors.