From 9d48f87a3d256bb6cfc9c7b386d06bb2815308ca Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Wed, 9 Oct 2024 19:27:33 +0300 Subject: [PATCH] Address review comments. --- Doc/library/typing.rst | 4 ++-- Doc/whatsnew/3.13.rst | 3 --- Doc/whatsnew/3.14.rst | 5 +++++ .../Library/2022-04-28-18-45-58.gh-issue-116241.hu9kRk.rst | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst index 3facbf918254ed..4ab5a3c2200084 100644 --- a/Doc/library/typing.rst +++ b/Doc/library/typing.rst @@ -2389,8 +2389,8 @@ types. disallowed in Python 3.15. To create a NamedTuple class with 0 fields, use ``class NT(NamedTuple): pass`` or ``NT = NamedTuple("NT", [])``. - .. versionchanged:: 3.13 - Added support of multiple inheritence. + .. versionchanged:: 3.14 + Added support for arbitrary multiple inheritance. .. class:: NewType(name, tp) diff --git a/Doc/whatsnew/3.13.rst b/Doc/whatsnew/3.13.rst index 3f87423228ccd3..a2897097aaba57 100644 --- a/Doc/whatsnew/3.13.rst +++ b/Doc/whatsnew/3.13.rst @@ -1397,9 +1397,6 @@ typing (Contributed by Mehdi Drissi in :gh:`89547`.) -* Add support of multiple inheritance with :class:`~typing.NamedTuple`. - (Contributed by Serhiy Storchaka in :gh:`116241`.) - unicodedata ----------- diff --git a/Doc/whatsnew/3.14.rst b/Doc/whatsnew/3.14.rst index c62a3ca5872eef..75ec49d9f46c5d 100644 --- a/Doc/whatsnew/3.14.rst +++ b/Doc/whatsnew/3.14.rst @@ -574,6 +574,11 @@ typing * Remove :class:`!typing.ByteString`. It had previously raised a :exc:`DeprecationWarning` since Python 3.12. +* Add support of multiple inheritance with :class:`~typing.NamedTuple`. + Previously, multiple inheritance was only supported if there was exactly + one other base and the base was :class:`typing.Generic`. + (Contributed by Serhiy Storchaka in :gh:`116241`.) + urllib ------ diff --git a/Misc/NEWS.d/next/Library/2022-04-28-18-45-58.gh-issue-116241.hu9kRk.rst b/Misc/NEWS.d/next/Library/2022-04-28-18-45-58.gh-issue-116241.hu9kRk.rst index af986fce982ac3..0cbfb8ad12f6e3 100644 --- a/Misc/NEWS.d/next/Library/2022-04-28-18-45-58.gh-issue-116241.hu9kRk.rst +++ b/Misc/NEWS.d/next/Library/2022-04-28-18-45-58.gh-issue-116241.hu9kRk.rst @@ -1 +1 @@ -Add support of multiple inheritance with :class:`typing.NamedTuple`. +Add support for arbitrary multiple inheritance with :class:`typing.NamedTuple`.