From b892e51e55906f48d952339c1228ffa1f9df51af Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Mon, 16 Feb 2026 22:32:53 +0200 Subject: [PATCH 1/8] Update lazy imports anchor --- Doc/whatsnew/3.15.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/whatsnew/3.15.rst b/Doc/whatsnew/3.15.rst index 42b6171c1a83a2..86db123520eff8 100644 --- a/Doc/whatsnew/3.15.rst +++ b/Doc/whatsnew/3.15.rst @@ -66,7 +66,7 @@ Summary -- Release highlights .. PEP-sized items next. * :pep:`810`: :ref:`Explicit lazy imports for faster startup times - ` + ` * :pep:`814`: :ref:`Add frozendict built-in type ` * :pep:`799`: :ref:`A dedicated profiling package for organizing Python @@ -86,7 +86,7 @@ Summary -- Release highlights New features ============ -.. _whatsnew315-pep810: +.. _whatsnew315-lazy-imports: :pep:`810`: Explicit lazy imports --------------------------------- From e8dda940b30a0106ca3c96a8ff84807518ec76a0 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Wed, 25 Feb 2026 13:28:59 +0200 Subject: [PATCH 2/8] Move 'Upgraded JIT compiler' under Optimizations --- Doc/whatsnew/3.15.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/whatsnew/3.15.rst b/Doc/whatsnew/3.15.rst index 86db123520eff8..0ec83760cb7f0f 100644 --- a/Doc/whatsnew/3.15.rst +++ b/Doc/whatsnew/3.15.rst @@ -1273,7 +1273,7 @@ csv .. _whatsnew315-jit: Upgraded JIT compiler -===================== +--------------------- Results from the `pyperformance `__ benchmark suite report From 09e9dcb0477ea67eefc45a1c0fddaf1a8863e2ac Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Thu, 19 Feb 2026 13:46:55 +0200 Subject: [PATCH 3/8] Sentence case --- Doc/whatsnew/3.15.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/whatsnew/3.15.rst b/Doc/whatsnew/3.15.rst index 0ec83760cb7f0f..34d38f0041b98a 100644 --- a/Doc/whatsnew/3.15.rst +++ b/Doc/whatsnew/3.15.rst @@ -73,7 +73,7 @@ Summary -- Release highlights profiling tools ` * :pep:`799`: :ref:`Tachyon: High frequency statistical sampling profiler ` -* :pep:`798`: :ref:`Unpacking in Comprehensions +* :pep:`798`: :ref:`Unpacking in comprehensions ` * :pep:`686`: :ref:`Python now uses UTF-8 as the default encoding ` From 0fbfc0937498a7b08427a49f778958995006524f Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Tue, 3 Mar 2026 14:27:39 +0200 Subject: [PATCH 4/8] Add PEP 747 to release summary --- Doc/whatsnew/3.15.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Doc/whatsnew/3.15.rst b/Doc/whatsnew/3.15.rst index 34d38f0041b98a..b87b7c4a780e1a 100644 --- a/Doc/whatsnew/3.15.rst +++ b/Doc/whatsnew/3.15.rst @@ -77,6 +77,8 @@ Summary -- Release highlights ` * :pep:`686`: :ref:`Python now uses UTF-8 as the default encoding ` +* :pep:`747`: :ref:`Annotating type forms with TypeForm + ` * :pep:`782`: :ref:`A new PyBytesWriter C API to create a Python bytes object ` * :ref:`The JIT compiler has been significantly upgraded ` @@ -1438,6 +1440,8 @@ threading typing ------ +.. _whatsnew315-typeform: + * :pep:`747`: Add :data:`~typing.TypeForm`, a new special form for annotating values that are themselves type expressions. ``TypeForm[T]`` means "a type form object describing ``T`` (or a type From da15d8e6d6d2228f1d332bec09486a0faac5d67e Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Tue, 3 Mar 2026 14:28:08 +0200 Subject: [PATCH 5/8] List the *undocumented* PEP 728 --- Doc/whatsnew/3.15.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/Doc/whatsnew/3.15.rst b/Doc/whatsnew/3.15.rst index b87b7c4a780e1a..d93b4e07281671 100644 --- a/Doc/whatsnew/3.15.rst +++ b/Doc/whatsnew/3.15.rst @@ -77,6 +77,7 @@ Summary -- Release highlights ` * :pep:`686`: :ref:`Python now uses UTF-8 as the default encoding ` +* :pep:`728`: ``TypedDict`` with typed extra items * :pep:`747`: :ref:`Annotating type forms with TypeForm ` * :pep:`782`: :ref:`A new PyBytesWriter C API to create a Python bytes object From c7c23134111286ad66d61ee19d34c7d021431386 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Tue, 3 Mar 2026 14:28:29 +0200 Subject: [PATCH 6/8] Remove PEP number from ref --- Doc/whatsnew/3.15.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/whatsnew/3.15.rst b/Doc/whatsnew/3.15.rst index d93b4e07281671..1e5d119b988433 100644 --- a/Doc/whatsnew/3.15.rst +++ b/Doc/whatsnew/3.15.rst @@ -81,7 +81,7 @@ Summary -- Release highlights * :pep:`747`: :ref:`Annotating type forms with TypeForm ` * :pep:`782`: :ref:`A new PyBytesWriter C API to create a Python bytes object - ` + ` * :ref:`The JIT compiler has been significantly upgraded ` * :ref:`Improved error messages ` @@ -1641,7 +1641,7 @@ New features and :c:data:`Py_mod_abi`. (Contributed by Petr Viktorin in :gh:`137210`.) -.. _whatsnew315-pep782: +.. _whatsnew315-pybyteswriter: * Implement :pep:`782`, the :ref:`PyBytesWriter API `. Add functions: From 38ff17b75967c7c9f1540e9c4ddbecaab0fe91fe Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Thu, 5 Mar 2026 15:21:21 +0200 Subject: [PATCH 7/8] Update frozendict formatting --- Doc/whatsnew/3.15.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Doc/whatsnew/3.15.rst b/Doc/whatsnew/3.15.rst index 1e5d119b988433..4218504d93c795 100644 --- a/Doc/whatsnew/3.15.rst +++ b/Doc/whatsnew/3.15.rst @@ -192,9 +192,9 @@ raise :exc:`SyntaxError`). ---------------------------------------- A new :term:`immutable` type, :class:`frozendict`, is added to the :mod:`builtins` module. -It does not allow modification after creation. A ``frozendict`` is not a subclass of ``dict``; -it inherits directly from ``object``. A ``frozendict`` is :term:`hashable` -as long as all of its keys and values are hashable. A ``frozendict`` preserves +It does not allow modification after creation. A :class:`!frozendict` is not a subclass of ``dict``; +it inherits directly from ``object``. A :class:`!frozendict` is :term:`hashable` +as long as all of its keys and values are hashable. A :class:`!frozendict` preserves insertion order, but comparison does not take order into account. For example:: From 2f44acd7188cbdd312846610579a54d97d581b6c Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Mon, 9 Mar 2026 11:25:15 +0200 Subject: [PATCH 8/8] 'import datetime as dt' is preferred, so use another example --- Doc/whatsnew/3.15.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Doc/whatsnew/3.15.rst b/Doc/whatsnew/3.15.rst index 4218504d93c795..ead4e7cbf2871e 100644 --- a/Doc/whatsnew/3.15.rst +++ b/Doc/whatsnew/3.15.rst @@ -123,12 +123,12 @@ name: .. code-block:: python lazy import json - lazy from datetime import datetime + lazy from pathlib import Path - print("Starting up...") # json and datetime not loaded yet + print("Starting up...") # json and pathlib not loaded yet - data = json.loads('{"key": "value"}') # json gets loads here - now = datetime() # datetime loads here + data = json.loads('{"key": "value"}') # json loads here + p = Path(".") # pathlib loads here This mechanism is particularly useful for applications that import many modules at the top level but may only use a subset of them in any given run.