Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 52 additions & 39 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -800,13 +800,63 @@ Special typing primitives
Abstract Base Classes
~~~~~~~~~~~~~~~~~~~~~

.. class:: AsyncContextManager

See :py:class:`typing.AsyncContextManager`. In ``typing`` since 3.5.4 and 3.6.2.

``typing_extensions`` backports the optional second type parameter added
in Python 3.13. It specifies the type of the result of awaiting
``__aexit__()`` and defaults to ``bool | None``.

.. versionchanged:: 4.12.0

Added the second type parameter.

.. class:: AsyncGenerator

See :py:class:`typing.AsyncGenerator`. In ``typing`` since 3.6.1.

``typing_extensions`` backports the Python 3.13 default of ``None`` for
the second type parameter (the send type). This makes ``AsyncGenerator[int]``
equivalent to ``AsyncGenerator[int, None]``.

.. versionchanged:: 4.12.0

Made the second type parameter optional.

.. class:: Buffer

See :py:class:`collections.abc.Buffer`. Added to the standard library
in Python 3.12.

.. versionadded:: 4.6.0

.. class:: ContextManager

See :py:class:`typing.ContextManager`. In ``typing`` since 3.5.4.

``typing_extensions`` backports the optional second type parameter added
in Python 3.13. It specifies the return type of ``__exit__()`` and
defaults to ``bool | None``.

.. versionchanged:: 4.12.0

Added the second type parameter.

.. class:: Generator

See :py:class:`typing.Generator`. In ``typing`` since 3.5.

``typing_extensions`` backports the Python 3.13 defaults for the second
(send) and third (return) type parameters. Both default to ``None``, so
``Generator[int]`` is equivalent to ``Generator[int, None, None]``.

.. versionadded:: 4.7.0

.. versionchanged:: 4.12.0

Made the second and third type parameters optional.

Protocols
~~~~~~~~~

Expand Down Expand Up @@ -1323,8 +1373,8 @@ Sentinel objects
Pure aliases
~~~~~~~~~~~~

Most of these are simply re-exported from the :mod:`typing` module on all supported
versions of Python, but all are listed here for completeness.
These names are re-exported directly from :mod:`typing` on all supported
versions of Python where they are available.

.. class:: AbstractSet

Expand All @@ -1338,23 +1388,6 @@ versions of Python, but all are listed here for completeness.

.. versionadded:: 4.7.0

.. class:: AsyncContextManager

See :py:class:`typing.AsyncContextManager`. In ``typing`` since 3.5.4 and 3.6.2.

.. versionchanged:: 4.12.0

``AsyncContextManager`` now has an optional second parameter, defaulting to
``Optional[bool]``, signifying the return type of the ``__aexit__`` method.

.. class:: AsyncGenerator

See :py:class:`typing.AsyncGenerator`. In ``typing`` since 3.6.1.

.. versionchanged:: 4.12.0

The second type parameter is now optional (it defaults to ``None``).

.. class:: AsyncIterable

See :py:class:`typing.AsyncIterable`. In ``typing`` since 3.5.2.
Expand Down Expand Up @@ -1399,15 +1432,6 @@ versions of Python, but all are listed here for completeness.

.. versionadded:: 4.7.0

.. class:: ContextManager

See :py:class:`typing.ContextManager`. In ``typing`` since 3.5.4.

.. versionchanged:: 4.12.0

``ContextManager`` now has an optional second parameter, defaulting to
``Optional[bool]``, signifying the return type of the ``__exit__`` method.

.. class:: Coroutine

See :py:class:`typing.Coroutine`. In ``typing`` since 3.5.3.
Expand Down Expand Up @@ -1442,17 +1466,6 @@ versions of Python, but all are listed here for completeness.

.. versionadded:: 4.7.0

.. class:: Generator

See :py:class:`typing.Generator`.

.. versionadded:: 4.7.0

.. versionchanged:: 4.12.0

The second type and third type parameters are now optional
(they both default to ``None``).

.. class:: Generic

See :py:class:`typing.Generic`.
Expand Down
Loading