Skip to content

Commit db044b6

Browse files
PEP 749: Mark as Accepted (#4406)
1 parent 998a123 commit db044b6

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

peps/pep-0749.rst

+8-5
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@ PEP: 749
22
Title: Implementing PEP 649
33
Author: Jelle Zijlstra <jelle.zijlstra@gmail.com>
44
Discussions-To: https://discuss.python.org/t/pep-749-implementing-pep-649/54974
5-
Status: Draft
5+
Status: Accepted
66
Type: Standards Track
77
Topic: Typing
88
Requires: 649
99
Created: 28-May-2024
1010
Python-Version: 3.14
1111
Post-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

1415
Abstract
@@ -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

4243
Motivation
@@ -633,7 +634,9 @@ Specification
633634
An 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
635636
other 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

638641
Compiler-generated
639642
annotate functions will support this format and return the same value as
@@ -875,9 +878,9 @@ print an empty dictionary twice, because the ``__annotate__`` function
875878
is set only when module execution is complete. This is obviously
876879
unintuitive.
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

882885
Specification
883886
-------------

0 commit comments

Comments
 (0)