Skip to content

gh-161229: Accept None for globals and locals in __lazy_import__() - #161231

Open
lazerg wants to merge 2 commits into
python:mainfrom
lazerg:fix-issue-161229
Open

lazerg wants to merge 2 commits into
python:mainfrom
lazerg:fix-issue-161229

Conversation

@lazerg

@lazerg lazerg commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

__lazy_import__() shows globals=None and locals=None in its signature, but passing globals=None explicitly raised TypeError because only the C-level NULL default fell back to the caller's globals. This treats None the same as an omitted argument.

@sobolevn sobolevn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM :)

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.

2 participants