Skip to content

Commit fc310cb

Browse files
bpo-38291: Remove mention of typing.io and typing.re again (GH-26113)
They were originally removed in GH-10173 per bpo-35089, but then readded in GH-21574. Cf. bpo-38291 for decision to remove. (cherry picked from commit 8a76683) Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
1 parent 809c3fa commit fc310cb

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

Diff for: Doc/library/typing.rst

+10-2
Original file line numberDiff line numberDiff line change
@@ -1488,7 +1488,11 @@ Other concrete types
14881488
Generic type ``IO[AnyStr]`` and its subclasses ``TextIO(IO[str])``
14891489
and ``BinaryIO(IO[bytes])``
14901490
represent the types of I/O streams such as returned by
1491-
:func:`open`. These types are also in the ``typing.io`` namespace.
1491+
:func:`open`.
1492+
1493+
.. deprecated-removed:: 3.8 3.12
1494+
These types are also in the ``typing.io`` namespace, which was
1495+
never supported by type checkers and will be removed.
14921496

14931497
.. class:: Pattern
14941498
Match
@@ -1498,7 +1502,11 @@ Other concrete types
14981502
:func:`re.match`. These types (and the corresponding functions)
14991503
are generic in ``AnyStr`` and can be made specific by writing
15001504
``Pattern[str]``, ``Pattern[bytes]``, ``Match[str]``, or
1501-
``Match[bytes]``. These types are also in the ``typing.re`` namespace.
1505+
``Match[bytes]``.
1506+
1507+
.. deprecated-removed:: 3.8 3.12
1508+
These types are also in the ``typing.re`` namespace, which was
1509+
never supported by type checkers and will be removed.
15021510

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

0 commit comments

Comments
 (0)