Skip to content

[3.11] gh-109521: Fix obscure cases handling in PyImport_GetImporter() (GH-109522)#109781

Merged
serhiy-storchaka merged 1 commit intopython:3.11from
serhiy-storchaka:backport-62c7015-3.11
Oct 7, 2023
Merged

[3.11] gh-109521: Fix obscure cases handling in PyImport_GetImporter() (GH-109522)#109781
serhiy-storchaka merged 1 commit intopython:3.11from
serhiy-storchaka:backport-62c7015-3.11

Conversation

@serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented Sep 23, 2023

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.
(cherry picked from commit 62c7015)

…orter() (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..
(cherry picked from commit 62c7015)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant