Files
cpython/Python
Miss Islington (bot)andBrittany Reynoso f8375c23b9 [3.15] gh-158820: Add null checks to avoid segfaults with lazy imports at shutdown (GH-158821) (#159062)
gh-158820: Add null checks to avoid segfaults with lazy imports at shutdown (GH-158821)

Destructors can run after finalization has cleared the interpreter's
lazy_modules set and lazy_pending_submodules dict. Declaring or
resolving a lazy import from one of them passed NULL to PySet_Add(),
PySet_Discard() or the pending-submodules lookup.

Treat the bookkeeping as a no-op once the state is gone, as the other
readers of this state already do.
(cherry picked from commit a6e636148e)

Co-authored-by: Brittany Reynoso <breynoso@meta.com>
2026-10-09 12:14:23 -07:00
..
…

Miscellaneous source files for the main Python shared library