Skip to content
Merged
Show file tree
Hide file tree
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
12 changes: 10 additions & 2 deletions Doc/library/typing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1488,7 +1488,11 @@ Other concrete types
Generic type ``IO[AnyStr]`` and its subclasses ``TextIO(IO[str])``
and ``BinaryIO(IO[bytes])``
represent the types of I/O streams such as returned by
:func:`open`. These types are also in the ``typing.io`` namespace.
:func:`open`.

.. deprecated-removed:: 3.8 3.12
These types are also in the ``typing.io`` namespace, which was
never supported by type checkers and will be removed.

.. class:: Pattern
Match
Expand All @@ -1498,7 +1502,11 @@ Other concrete types
:func:`re.match`. These types (and the corresponding functions)
are generic in ``AnyStr`` and can be made specific by writing
``Pattern[str]``, ``Pattern[bytes]``, ``Match[str]``, or
``Match[bytes]``. These types are also in the ``typing.re`` namespace.
``Match[bytes]``.

.. deprecated-removed:: 3.8 3.12
These types are also in the ``typing.re`` namespace, which was
never supported by type checkers and will be removed.

.. deprecated:: 3.9
Classes ``Pattern`` and ``Match`` from :mod:`re` now support ``[]``.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Mark ``typing.io`` and ``typing.re`` as deprecated since Python 3.8 in the
documentation. They were never properly supported by type checkers.