Skip to content

gh-162415: Use binding globals for lazy import hooks - #162416

Open
tonghuaroot wants to merge 1 commit into
python:mainfrom
tonghuaroot:pep810-declaration-globals
Open

tonghuaroot wants to merge 1 commit into
python:mainfrom
tonghuaroot:pep810-declaration-globals

Conversation

@tonghuaroot

@tonghuaroot tonghuaroot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Use the namespace that owns a lazy import binding as the globals and locals
passed to the saved import function during automatic reification. Explicit
resolve() calls keep their existing caller-globals behavior.

Automatic reification could pass the accessing module's globals to a custom import function. Use the namespace that owns the lazy binding instead.
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.

1 participant