Skip to content

Conversation

@pablogsal
Copy link
Member

@pablogsal pablogsal commented Oct 13, 2025

This commit updates PEP 810 based on team discussion and feedback:

  1. Allow lazy imports inside with blocks

    • Removed with blocks from syntax restrictions
    • Added rejected ideas section explaining why restriction was considered
  2. dict does not automatically reify lazy imports

    • Both globals() and __dict__ return raw dictionary without reification
    • Updated reification section, FAQ, and rejected ideas

📚 Documentation preview 📚: https://pep-previews--4656.org.readthedocs.build/

This commit updates PEP 810 based on team discussion and feedback:

1. Allow lazy imports inside with blocks
   - Removed with blocks from syntax restrictions
   - Added rejected ideas section explaining why restriction was considered

2. __dict__ does not automatically reify lazy imports
   - Both globals() and __dict__ return raw dictionary without reification
   - Updated reification section, FAQ, and rejected ideas
Copy link
Member

@pganssle pganssle left a comment

Choose a reason for hiding this comment

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

with block stuff LGTM, except for one note.

pablogsal and others added 3 commits October 13, 2025 20:30
Co-authored-by: T. Wouters <thomas@python.org>
Co-authored-by: T. Wouters <thomas@python.org>
Co-authored-by: T. Wouters <thomas@python.org>
pablogsal and others added 2 commits October 14, 2025 13:18
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
@pablogsal pablogsal enabled auto-merge (squash) October 14, 2025 15:13
@pablogsal pablogsal merged commit 3b8bf7c into python:main Oct 14, 2025
4 of 5 checks passed
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.

4 participants