@@ -2,13 +2,14 @@ PEP: 749
22Title: Implementing PEP 649
33Author: Jelle Zijlstra <
[email protected] >
44Discussions-To: https://discuss.python.org/t/pep-749-implementing-pep-649/54974
5- Status: Draft
5+ Status: Accepted
66Type: Standards Track
77Topic: Typing
88Requires: 649
99Created: 28-May-2024
1010Python-Version: 3.14
1111Post-History: `04-Jun-2024 <https://discuss.python.org/t/pep-749-implementing-pep-649/54974 >`__
12+ Resolution: `05-May-2025 <https://discuss.python.org/t/pep-749-implementing-pep-649/54974/66 >`__
1213
1314
1415Abstract
@@ -36,7 +37,7 @@ specification:
3637* The ``SOURCE `` format is renamed to ``STRING `` to improve clarity and reduce the risk of
3738 user confusion.
3839* Conditionally defined class and module annotations are handled correctly.
39- * If annotations are accessed a partially executed module, the annotations executed so far
40+ * If annotations are accessed on a partially executed module, the annotations executed so far
4041 are returned, but not cached.
4142
4243Motivation
@@ -633,7 +634,9 @@ Specification
633634An additional format, ``VALUE_WITH_FAKE_GLOBALS ``, is added to the ``Format `` enum in the
634635``annotationlib `` module, with value equal to 2. (As a result, the values of the
635636other formats will shift relative to PEP 649: ``FORWARDREF `` will be 3 and ``SOURCE ``
636- will be 4.)
637+ will be 4.) The integer values of these formats are specified for use in places where
638+ the enum is not readily available, such as in ``__annotate__ `` functions implemented
639+ in C.
637640
638641Compiler-generated
639642annotate functions will support this format and return the same value as
@@ -875,9 +878,9 @@ print an empty dictionary twice, because the ``__annotate__`` function
875878is set only when module execution is complete. This is obviously
876879unintuitive.
877880
878- See `python/cpython#130907 `__ for implementation.
881+ See `python/cpython#131550 `__ for implementation.
879882
880- __ https://github.com/python/cpython/issue/130907
883+ __ https://github.com/python/cpython/pull/131550
881884
882885Specification
883886-------------
0 commit comments