Skip to content

[3.15] gh-158824: Fix __getattr__ blocking reification of lazy imports (GH-158825) - #159022

Open
miss-islington wants to merge 1 commit into
python:3.15from
miss-islington:backport-56f9837-3.15
Open

miss-islington wants to merge 1 commit into
python:3.15from
miss-islington:backport-56f9837-3.15

Conversation

@miss-islington

@miss-islington miss-islington commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

When a module attribute was a lazy import placeholder, module attribute
lookup called the module's getattr before resolving it. This was
needed while lazy from-imports published placeholders on the source
module. That no longer happens, so the check only affected the module's
own lazy imports: a catch-all getattr hid them, unlike eager imports.

Resolve the placeholder directly.
(cherry picked from commit 56f9837)

Co-authored-by: Brittany Reynoso breynoso@meta.com

…ts (pythonGH-158825)

When a module attribute was a lazy import placeholder, module attribute
lookup called the module's __getattr__ before resolving it. This was
needed while lazy from-imports published placeholders on the source
module. That no longer happens, so the check only affected the module's
own lazy imports: a catch-all __getattr__ hid them, unlike eager imports.

Resolve the placeholder directly.
(cherry picked from commit 56f9837db25fd65fa6d10862e572270574ab2b0d)

Co-authored-by: Brittany Reynoso <breynoso@meta.com>
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