Skip to content

gh-158140: Resolve lazy submodules independently with custom import hooks - #158815

Draft
pablogsal wants to merge 1 commit into
python:mainfrom
pablogsal:lazy-import-independent-restart
Draft

pablogsal wants to merge 1 commit into
python:mainfrom
pablogsal:lazy-import-independent-restart

Conversation

@pablogsal

@pablogsal pablogsal commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

Resolve ordinary packages from the root down, so accessing one lazy submodule doesn't import its siblings. Unresolved placeholders keep the declarations for their package and namespace, while the shared registry keeps the original declarations and selects the matching builtins hook. This keeps the bookkeeping in the import paths; private hook results retain full-path behavior.

@read-the-docs-community

read-the-docs-community Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #34941639 | 📁 Comparing 200bac8 against main (e0861c6)

  🔍 Preview build  

5 files changed · ± 5 modified

± Modified

@pablogsal
pablogsal force-pushed the lazy-import-independent-restart branch 3 times, most recently from 979f879 to 63a9bca Compare October 5, 2026 09:52
@pablogsal
pablogsal force-pushed the lazy-import-independent-restart branch from 63a9bca to 200bac8 Compare October 5, 2026 10:08
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.

1 participant