Skip to content

PEP 749: Updates #4316

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 23, 2025
Merged

PEP 749: Updates #4316

merged 6 commits into from
Apr 23, 2025

Conversation

JelleZijlstra
Copy link
Member

@JelleZijlstra JelleZijlstra commented Mar 21, 2025

  • Add discussion of conditional annotations
  • Add discussion of partially execute modules
  • Change plans on the metaclasses issue
  • Explain the motivation of the VALUE_WITH_FAKE_GLOBALS name
  • Adjust two APIs in annotationlib

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

Co-authored-by: Adam Turner <[email protected]>
@JelleZijlstra JelleZijlstra changed the title PEP 749: Add conditional annotations and partially executed modules PEP 749: Updates Apr 13, 2025
with the ``__future__`` import enabled and has annotations, and a class using that metaclass is
defined without the ``__future__`` import, accessing ``.__annotations__`` on that class will yield
the wrong results. However, this bug already exists in previous versions of Python. It could be
fixed by setting the annotations at a different key in the class dict in this case too, but that
Copy link
Member Author

Choose a reason for hiding this comment

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

For my own reference: local branch pep649-annocache implements this but I decided it wasn't worth it.

@JelleZijlstra JelleZijlstra merged commit 8b44c5e into python:main Apr 23, 2025
5 checks passed
@JelleZijlstra JelleZijlstra deleted the pep749-classes branch April 23, 2025 02:03
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