summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2021-06-14 15:07:05 (GMT)
committerGitHub <noreply@github.com>2021-06-14 15:07:05 (GMT)
commit7f021952b2debb51306f70ec96a94ecc7fbffc19 (patch)
tree60f57e56b42a295ba74bee80d761257d864e0e76
parent9ee8752162d54c595b1ce4b1bebc4dff94b9c659 (diff)
downloadcpython-7f021952b2debb51306f70ec96a94ecc7fbffc19.zip
cpython-7f021952b2debb51306f70ec96a94ecc7fbffc19.tar.gz
cpython-7f021952b2debb51306f70ec96a94ecc7fbffc19.tar.bz2
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 8a76683cfb842e12b57f6d276839f6c68fd94e1a) Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
-rw-r--r--Doc/library/typing.rst12
-rw-r--r--Misc/NEWS.d/next/Documentation/2021-06-14-09-20-37.bpo-38291.VMYa_Q.rst2
2 files changed, 12 insertions, 2 deletions
diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst
index 06a8b81..78ab760 100644
--- a/Doc/library/typing.rst
+++ b/Doc/library/typing.rst
@@ -1179,7 +1179,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
@@ -1189,7 +1193,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 ``[]``.
diff --git a/Misc/NEWS.d/next/Documentation/2021-06-14-09-20-37.bpo-38291.VMYa_Q.rst b/Misc/NEWS.d/next/Documentation/2021-06-14-09-20-37.bpo-38291.VMYa_Q.rst
new file mode 100644
index 0000000..23ce35e
--- /dev/null
+++ b/Misc/NEWS.d/next/Documentation/2021-06-14-09-20-37.bpo-38291.VMYa_Q.rst
@@ -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.