FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[3.15] gh-158824: Fix `__getattr__` blocking reification of lazy imports (GH-158825) by miss-islington · Pull Request #159022 · python/cpython · GitHub

Repository navigation

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

Merged
encukou merged 1 commit into
python:3.15from
miss-islington:backport-56f9837-3.15
Oct 12, 2026
Merged

encukou merged 1 commit into
python:3.15from
miss-islington:backport-56f9837-3.15

Conversation

miss-islington commented Oct 8, 2026 •
edited by bedevere-app Bot
Loading

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 56f9837)

Co-authored-by: Brittany Reynoso <breynoso@meta.com>
encukou merged commit aad4500 into python:3.15 Oct 12, 2026
55 checks passed
miss-islington deleted the backport-56f9837-3.15 branch October 12, 2026 11:38
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL