Skip to content

gh-142349: Fill gaps in lazy import documentation - #162386

Merged
pablogsal merged 7 commits into
python:mainfrom
pablogsal:docs/lazy-imports-audit-20261121
Nov 28, 2026
Merged

pablogsal merged 7 commits into
python:mainfrom
pablogsal:docs/lazy-imports-audit-20261121

Conversation

@pablogsal

@pablogsal pablogsal commented Nov 21, 2026 •

Copy link
Copy Markdown
Member

The lazy import docs omit some resolution rules and runtime controls. This adds those details and corrects the AST, bytecode and API help.

PRs #161762 and #161716 cover __lazy_import__.

Related to #142349.

@read-the-docs-community

read-the-docs-community Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

@pablogsal
pablogsal requested review from encukou and hugovk November 21, 2026 13:28

Copy link
Copy Markdown
Member Author

CC @hugovk @encukou @AA-Turner

@pablogsal

Copy link
Copy Markdown
Member Author

I don't think there are more gaps in the docs after this

@warsaw

warsaw commented Nov 21, 2026

Copy link
Copy Markdown
Member

Good to see this, and I'll do a review hopefully soon. I've been looking into updates to the import system docs in the language reference manual, so thanks for adding those.

Comment thread Doc/builtins/functions.rst Resolved
Comment thread Lib/pydoc_data/topics.py Resolved
Comment thread Doc/tutorial/modules.rst Resolved
Comment thread Doc/library/importlib.rst Resolved
Comment thread Doc/library/types.rst Resolved
@pablogsal
pablogsal requested a review from hugovk November 24, 2026 15:18
Comment thread Doc/library/importlib.rst Resolved

@encukou encukou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for taking this on!

I left suggestions in pablogsal#149, since GitHub is quirky about suggestions on unchanged lines.

pablogsal and others added 2 commits November 27, 2026 16:09
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
@pablogsal
pablogsal merged commit 9d66e0c into python:main Nov 28, 2026
59 checks passed
@pablogsal
pablogsal deleted the docs/lazy-imports-audit-20261121 branch November 28, 2026 14:49
@miss-islington-app

Copy link
Copy Markdown

Thanks @pablogsal for the PR 🌮🎉.. I'm working now to backport this PR to: 3.15.
🐍🍒⛏🤖

@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs Nov 28, 2026
@miss-islington-app

Copy link
Copy Markdown

Sorry, @pablogsal, I could not cleanly backport this to 3.15 due to a conflict.

Please backport manually with cherry_picker, see the devguide for more information.

cherry_picker 9d66e0c974531a48e35b092ca22b6d6c52709618 3.15

@bedevere-app

bedevere-app Bot commented Nov 28, 2026

Copy link
Copy Markdown

GH-162811 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 bugs and security fixes label Nov 28, 2026
pablogsal added a commit that referenced this pull request Nov 28, 2026
…162811)

Backport the lazy import documentation and API help to Python 3.15.

(cherry picked from commit 9d66e0c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip news topic-lazy-imports type-feature A feature request or enhancement

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants