Skip to content

GH-151672: __lazy_import__ always resolves to the module being imported#151827

Open
brandtbucher wants to merge 2 commits into
python:mainfrom
brandtbucher:codex/fix-lazy-import-fromlist
Open

GH-151672: __lazy_import__ always resolves to the module being imported#151827
brandtbucher wants to merge 2 commits into
python:mainfrom
brandtbucher:codex/fix-lazy-import-fromlist

Conversation

@brandtbucher

@brandtbucher brandtbucher commented Jun 21, 2026

Copy link
Copy Markdown
Member

Fix an inconsistency where calling __lazy_import__ with a string fromlist would resolve to the named member, rather than the module being imported (which is what other fromlist types and __import__ all do).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting core review interpreter-core (Objects, Python, Grammar, and Parser dirs) needs backport to 3.15 pre-release feature fixes, bugs and security fixes topic-lazy-imports type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant