Skip to content

bpo-38291: Remove mention of typing.io and typing.re again #26113

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 14, 2021
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.