From 3f3fbc46fd3ab85aff9e6dacaa7ae35e8659c8e4 Mon Sep 17 00:00:00 2001 From: sobolevn Date: Wed, 24 Sep 2025 15:51:13 +0300 Subject: [PATCH 1/2] Remove `.. deprecated-removed` notes for `typing.NamedTuple` --- Doc/library/typing.rst | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst index cf979205ff2cee..138819f8cd05c0 100644 --- a/Doc/library/typing.rst +++ b/Doc/library/typing.rst @@ -2435,19 +2435,6 @@ types. Using :func:`super` (and the ``__class__`` :term:`closure variable`) in methods of ``NamedTuple`` subclasses is unsupported and causes a :class:`TypeError`. - .. deprecated-removed:: 3.13 3.15 - The undocumented keyword argument syntax for creating NamedTuple classes - (``NT = NamedTuple("NT", x=int)``) is deprecated, and will be disallowed - in 3.15. Use the class-based syntax or the functional syntax instead. - - .. deprecated-removed:: 3.13 3.15 - When using the functional syntax to create a NamedTuple class, failing to - pass a value to the 'fields' parameter (``NT = NamedTuple("NT")``) is - deprecated. Passing ``None`` to the 'fields' parameter - (``NT = NamedTuple("NT", None)``) is also deprecated. Both will be - disallowed in Python 3.15. To create a NamedTuple class with 0 fields, - use ``class NT(NamedTuple): pass`` or ``NT = NamedTuple("NT", [])``. - .. class:: NewType(name, tp) Helper class to create low-overhead :ref:`distinct types `. From 4439de450478623b2f842f5de21302067fbff877 Mon Sep 17 00:00:00 2001 From: sobolevn Date: Wed, 24 Sep 2025 16:14:45 +0300 Subject: [PATCH 2/2] Remove `.. deprecated-removed` notes for `typing.TypedDict` --- Doc/library/typing.rst | 7 ------- 1 file changed, 7 deletions(-) diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst index 138819f8cd05c0..e0122986e9ba3a 100644 --- a/Doc/library/typing.rst +++ b/Doc/library/typing.rst @@ -2810,13 +2810,6 @@ types. .. versionchanged:: 3.13 Support for the :data:`ReadOnly` qualifier was added. - .. deprecated-removed:: 3.13 3.15 - When using the functional syntax to create a TypedDict class, failing to - pass a value to the 'fields' parameter (``TD = TypedDict("TD")``) is - deprecated. Passing ``None`` to the 'fields' parameter - (``TD = TypedDict("TD", None)``) is also deprecated. Both will be - disallowed in Python 3.15. To create a TypedDict class with 0 fields, - use ``class TD(TypedDict): pass`` or ``TD = TypedDict("TD", {})``. Protocols ---------