From e54f68b9ed8a769a65856fdb9d1d47c6dfa8cc45 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Mon, 5 May 2025 19:28:31 -0700 Subject: [PATCH 1/3] PEP 749: Mark as Accepted --- peps/pep-0749.rst | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/peps/pep-0749.rst b/peps/pep-0749.rst index c50a2b4883b..5eff3e80d01 100644 --- a/peps/pep-0749.rst +++ b/peps/pep-0749.rst @@ -2,13 +2,14 @@ PEP: 749 Title: Implementing PEP 649 Author: Jelle Zijlstra Discussions-To: https://discuss.python.org/t/pep-749-implementing-pep-649/54974 -Status: Draft +Status: Accepted Type: Standards Track Topic: Typing Requires: 649 Created: 28-May-2024 Python-Version: 3.14 Post-History: `04-Jun-2024 `__ +Resolution: `05-May-2025 `__ Abstract @@ -633,7 +634,9 @@ Specification An additional format, ``VALUE_WITH_FAKE_GLOBALS``, is added to the ``Format`` enum in the ``annotationlib`` module, with value equal to 2. (As a result, the values of the other formats will shift relative to PEP 649: ``FORWARDREF`` will be 3 and ``SOURCE`` -will be 4.) +will be 4.) The integer values of these formats are specified for use in places where +the enum is not readily available, such as in ``__annotate__`` functions implemented +in C. Compiler-generated annotate functions will support this format and return the same value as From ce6fc89c3a82c5211e81a462feea731768f52ff9 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Mon, 5 May 2025 22:17:09 -0700 Subject: [PATCH 2/3] fix link --- peps/pep-0749.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/peps/pep-0749.rst b/peps/pep-0749.rst index 5eff3e80d01..ca55add5055 100644 --- a/peps/pep-0749.rst +++ b/peps/pep-0749.rst @@ -878,9 +878,9 @@ print an empty dictionary twice, because the ``__annotate__`` function is set only when module execution is complete. This is obviously unintuitive. -See `python/cpython#130907`__ for implementation. +See `python/cpython#131550`__ for implementation. -__ https://github.com/python/cpython/issue/130907 +__ https://github.com/python/cpython/pull/131550 Specification ------------- From a5432dcecd37a48180bd78f37c1e78bd7ef6efd5 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Tue, 6 May 2025 07:06:07 -0700 Subject: [PATCH 3/3] missing word --- peps/pep-0749.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/peps/pep-0749.rst b/peps/pep-0749.rst index ca55add5055..f3ea7dbda3f 100644 --- a/peps/pep-0749.rst +++ b/peps/pep-0749.rst @@ -37,7 +37,7 @@ specification: * The ``SOURCE`` format is renamed to ``STRING`` to improve clarity and reduce the risk of user confusion. * Conditionally defined class and module annotations are handled correctly. -* If annotations are accessed a partially executed module, the annotations executed so far +* If annotations are accessed on a partially executed module, the annotations executed so far are returned, but not cached. Motivation