From 5168063cfc0fcc38b3fef65cedf5cd576590df8c Mon Sep 17 00:00:00 2001 From: Bayel1602 Date: Wed, 4 Nov 2026 22:46:57 +0600 Subject: [PATCH 1/2] gh-161311: Document inherited abstract methods in `collections.abc` (GH-161319) (cherry picked from commit 1dd8e71354a07ec0d82d0f5d042e0470e9953346) Co-authored-by: Bayel1602 --- Doc/library/collections.abc.rst | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Doc/library/collections.abc.rst b/Doc/library/collections.abc.rst index 213c79cc41494c5..f91c483b41284df 100644 --- a/Doc/library/collections.abc.rst +++ b/Doc/library/collections.abc.rst @@ -114,6 +114,9 @@ Collections Abstract Base Classes The collections module offers the following :term:`ABCs `: +The "Abstract Methods" column lists all required abstract methods, +including those inherited from parent classes. + .. tabularcolumns:: |l|L|L|L| ============================== ====================== ======================= ==================================================== @@ -123,7 +126,8 @@ ABC Inherits from Abstract Methods Mi :class:`Hashable` [1]_ ``__hash__`` :class:`Iterable` [1]_ [2]_ ``__iter__`` :class:`Iterator` [1]_ :class:`Iterable` ``__next__`` ``__iter__`` -:class:`Reversible` [1]_ :class:`Iterable` ``__reversed__`` +:class:`Reversible` [1]_ :class:`Iterable` ``__iter__``, + ``__reversed__`` :class:`Generator` [1]_ :class:`Iterator` ``send``, ``throw`` ``close``, ``__iter__``, ``__next__`` :class:`Sized` [1]_ ``__len__`` :class:`Callable` [1]_ ``__call__`` @@ -173,7 +177,8 @@ ABC Inherits from Abstract Methods Mi :class:`ValuesView` :class:`MappingView`, ``__contains__``, ``__iter__`` :class:`Collection` :class:`Awaitable` [1]_ ``__await__`` -:class:`Coroutine` [1]_ :class:`Awaitable` ``send``, ``throw`` ``close`` +:class:`Coroutine` [1]_ :class:`Awaitable` ``__await__``, ``close`` + ``send``, ``throw`` :class:`AsyncIterable` [1]_ ``__aiter__`` :class:`AsyncIterator` [1]_ :class:`AsyncIterable` ``__anext__`` ``__aiter__`` :class:`AsyncGenerator` [1]_ :class:`AsyncIterator` ``asend``, ``athrow`` ``aclose``, ``__aiter__``, ``__anext__`` From bbcb94f2573fcf317ad65d18eacf628e653eec3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A9n=C3=A9dikt=20Tran?= <10796600+picnixz@users.noreply.github.com> Date: Wed, 4 Nov 2026 17:55:20 +0100 Subject: [PATCH 2/2] Update collections.abc.rst --- Doc/library/collections.abc.rst | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Doc/library/collections.abc.rst b/Doc/library/collections.abc.rst index f91c483b41284df..c7bf0b7dbf0ec9a 100644 --- a/Doc/library/collections.abc.rst +++ b/Doc/library/collections.abc.rst @@ -112,10 +112,9 @@ of three ways. Collections Abstract Base Classes --------------------------------- -The collections module offers the following :term:`ABCs `: - -The "Abstract Methods" column lists all required abstract methods, -including those inherited from parent classes. +The collections module offers the following :term:`ABCs `, +where the "Abstract Methods" column lists all required abstract methods, +including those inherited from parent classes: .. tabularcolumns:: |l|L|L|L|