Skip to content

Commit

Permalink
bpo-38291: Remove mention of typing.io and typing.re again (pythonGH-…
Browse files Browse the repository at this point in the history
…26113)

They were originally removed in pythonGH-10173 per bpo-35089, but then
readded in pythonGH-21574. Cf. bpo-38291 for decision to remove.
  • Loading branch information
srittau authored Jun 14, 2021
1 parent 358aa61 commit 8a76683
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
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.

0 comments on commit 8a76683

Please sign in to comment.