Skip to content

gh-139669: Make __name__ and __file__ as a proxy for _LazyModule.__spec__#151006

Open
xuantengh wants to merge 2 commits into
python:mainfrom
xuantengh:xuantengh/ll
Open

gh-139669: Make __name__ and __file__ as a proxy for _LazyModule.__spec__#151006
xuantengh wants to merge 2 commits into
python:mainfrom
xuantengh:xuantengh/ll

Conversation

@xuantengh

@xuantengh xuantengh commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

This PR makes __name__ and __file__, as a proxy for _LazyModule.__spec__. That says, reading & writing both will be directly forwarded to _LazyModule.__spec__, which will NOT trigger the lazy loading.

@python-cla-bot

python-cla-bot Bot commented Jun 6, 2026

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@read-the-docs-community

read-the-docs-community Bot commented Jun 6, 2026

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #33018404 | 📁 Comparing 46b17f7 against main (b18b6a4)

  🔍 Preview build  

2 files changed
± library/importlib.html
± whatsnew/changelog.html

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