From c5e77bd1b7b4b916475008aa3de19aa54e77931e Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Fri, 8 Sep 2023 13:21:44 +0100 Subject: [PATCH 1/4] Typing PEPs: Inline the PEP 484 reference --- Doc/whatsnew/3.12.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/whatsnew/3.12.rst b/Doc/whatsnew/3.12.rst index 6b4ec99b43dea6..82e52801e9cf08 100644 --- a/Doc/whatsnew/3.12.rst +++ b/Doc/whatsnew/3.12.rst @@ -333,7 +333,7 @@ See :mod:`sys.monitoring` for details. New Features Related to Type Hints ================================== -This section covers major changes affecting :pep:`484` type hints and +This section covers major changes affecting :pep:`type hints <484>` and the :mod:`typing` module. .. _whatsnew312-pep692: From 324910114954148d6acb402c7058a2026bd1e257 Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Fri, 8 Sep 2023 13:23:02 +0100 Subject: [PATCH 2/4] 692: Replace "This PEP" with "PEP 692" --- Doc/whatsnew/3.12.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/whatsnew/3.12.rst b/Doc/whatsnew/3.12.rst index 82e52801e9cf08..fa40a47d604cf2 100644 --- a/Doc/whatsnew/3.12.rst +++ b/Doc/whatsnew/3.12.rst @@ -345,7 +345,7 @@ Typing ``**kwargs`` in a function signature as introduced by :pep:`484` allowed for valid annotations only in cases where all of the ``**kwargs`` were of the same type. -This PEP specifies a more precise way of typing ``**kwargs`` by relying on +:pep:`692` specifies a more precise way of typing ``**kwargs`` by relying on typed dictionaries:: from typing import TypedDict, Unpack From 3f726d5821872e6fc6b4ec2111f12dec40ef2502 Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Fri, 8 Sep 2023 13:23:47 +0100 Subject: [PATCH 3/4] 698: Add PEP link --- Doc/whatsnew/3.12.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Doc/whatsnew/3.12.rst b/Doc/whatsnew/3.12.rst index fa40a47d604cf2..e2ea3b0650f581 100644 --- a/Doc/whatsnew/3.12.rst +++ b/Doc/whatsnew/3.12.rst @@ -389,6 +389,8 @@ Example:: def get_colour(self) -> str: return "red" +See :pep:`698` for more details. + (Contributed by Steven Troxler in :gh:`101561`.) .. _whatsnew312-pep695: From c044f5e12c9fd09e4a41984b0123b832170ffbbe Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Fri, 8 Sep 2023 13:25:32 +0100 Subject: [PATCH 4/4] 695: Fix case of rendered text --- Doc/whatsnew/3.12.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/whatsnew/3.12.rst b/Doc/whatsnew/3.12.rst index e2ea3b0650f581..c2da362f7a1bbd 100644 --- a/Doc/whatsnew/3.12.rst +++ b/Doc/whatsnew/3.12.rst @@ -436,8 +436,8 @@ parameters with bounds or constraints:: The value of type aliases and the bound and constraints of type variables created through this syntax are evaluated only on demand (see -:ref:`lazy-evaluation`). This means type aliases are able to refer to other -types defined later in the file. +:ref:`lazy evaluation `). This means type aliases are able to +refer to other types defined later in the file. Type parameters declared through a type parameter list are visible within the scope of the declaration and any nested scopes, but not in the outer scope. For