forked from python/cpython
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pythongh-91351: Fix some bugs in importlib handling of re-entrant imp…
…orts (pythonGH-94504) Co-authored-by: Brett Cannon <[email protected]>
- Loading branch information
1 parent
6b3993c
commit 3325f05
Showing
2 changed files
with
201 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
Misc/NEWS.d/next/Core and Builtins/2023-01-06-09-22-21.gh-issue-91351.iq2vZ_.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Fix a case where re-entrant imports could corrupt the import deadlock | ||
detection code and cause a :exc:`KeyError` to be raised out of | ||
:mod:`importlib/_bootstrap`. In addition to the straightforward cases, this | ||
could also happen when garbage collection leads to a warning being emitted -- | ||
as happens when it collects an open socket or file) |