https://github.com/python/cpython/commit/acd402ecdb7d04d8730d2d10352fa22823b0bd1c commit: acd402ecdb7d04d8730d2d10352fa22823b0bd1c branch: 3.15 author: Miss Islington (bot) <[email protected]> committer: kumaraditya303 <[email protected]> date: 2026-05-25T09:36:22Z summary:
[3.15] gh-150374: Fix double release of import lock in lazy import reification (GH-150376) (#150378) gh-150374: Fix double release of import lock in lazy import reification (GH-150376) (cherry picked from commit 5498eba545e950c7550c924f2e458c740a689c69) Co-authored-by: pengyu lee <[email protected]> files: A Misc/NEWS.d/next/Core_and_Builtins/2026-05-25-16-00-22.gh-issue-150374.Emu6d8.rst M Python/import.c 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. diff --git a/Python/import.c b/Python/import.c index aa4ee660fa75da..fc1b3f1acbe063 100644 --- a/Python/import.c +++ b/Python/import.c @@ -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; } _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/python-checkins.python.org Member address: [email protected]
