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-109521: Fix obscure cases handling in PyImport_GetImporter() (…
…pythonGH-109522) PyImport_GetImporter() now sets RuntimeError if it fails to get sys.path_hooks or sys.path_importer_cache or they are not list and dict correspondingly. Previously it could return NULL without setting error in obscure cases, crash or raise SystemError if these attributes have wrong type.
- Loading branch information
1 parent
58bb3df
commit 309ff27
Showing
2 changed files
with
26 additions
and
5 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
Misc/NEWS.d/next/C API/2023-09-17-21-47-31.gh-issue-109521.JDF6i9.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 @@ | ||
:c:func:`PyImport_GetImporter` now sets RuntimeError if it fails to get | ||
:data:`sys.path_hooks` or :data:`sys.path_importer_cache` or they are not | ||
list and dict correspondingly. Previously it could return NULL without | ||
setting error in obscure cases, crash or raise SystemError if these | ||
attributes have wrong type. |
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