Skip to content

gh-145058: Add input validation to _PyImport_LazyImportModuleLevelObject#145068

Merged
pablogsal merged 3 commits intopython:mainfrom
StanFromIreland:lazy-val
Feb 21, 2026
Merged

gh-145058: Add input validation to _PyImport_LazyImportModuleLevelObject#145068
pablogsal merged 3 commits intopython:mainfrom
StanFromIreland:lazy-val

Conversation

@StanFromIreland
Copy link
Copy Markdown
Member

@StanFromIreland StanFromIreland commented Feb 21, 2026

This copies the checks from PyImport_ImportModuleLevelObject to _PyImport_LazyImportModuleLevelObject.

Comment thread Python/import.c Outdated
Comment thread Python/import.c Outdated
Comment thread Lib/test/test_import/test_lazy_imports.py Outdated
StanFromIreland and others added 2 commits February 21, 2026 10:26
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
Copy link
Copy Markdown
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pablogsal pablogsal merged commit e1bd0cd into python:main Feb 21, 2026
51 checks passed
@pablogsal
Copy link
Copy Markdown
Member

Thanks a lot @StanFromIreland! 🚀

@StanFromIreland StanFromIreland deleted the lazy-val branch February 21, 2026 12:58
brijkapadia pushed a commit to brijkapadia/cpython that referenced this pull request Feb 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants