There was an error while loading. Please reload this page.
1 parent 358aa61 commit 8a76683Copy full SHA for 8a76683
2 files changed
Doc/library/typing.rst
@@ -1488,7 +1488,11 @@ Other concrete types
1488
Generic type ``IO[AnyStr]`` and its subclasses ``TextIO(IO[str])``
1489
and ``BinaryIO(IO[bytes])``
1490
represent the types of I/O streams such as returned by
1491
- :func:`open`. These types are also in the ``typing.io`` namespace.
+ :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.
1496
1497
.. class:: Pattern
1498
Match
@@ -1498,7 +1502,11 @@ Other concrete types
1502
:func:`re.match`. These types (and the corresponding functions)
1499
1503
are generic in ``AnyStr`` and can be made specific by writing
1500
1504
``Pattern[str]``, ``Pattern[bytes]``, ``Match[str]``, or
1501
- ``Match[bytes]``. These types are also in the ``typing.re`` namespace.
1505
+ ``Match[bytes]``.
1506
1507
1508
+ These types are also in the ``typing.re`` namespace, which was
1509
1510
1511
.. deprecated:: 3.9
1512
Classes ``Pattern`` and ``Match`` from :mod:`re` now support ``[]``.
Misc/NEWS.d/next/Documentation/2021-06-14-09-20-37.bpo-38291.VMYa_Q.rst
@@ -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