gh-92332: Docs-only deprecation of typing.Text (GH-92351)

Co-authored-by: Shantanu <[email protected]>
This commit is contained in:
Alex Waygood
2022-05-06 18:15:18 +08:00
committed by GitHub
co-authored by Shantanu
parent cbc2c199a0
commit 6f18b86fda
3 changed files with 15 additions and 0 deletions
+7
View File
@@ -1976,6 +1976,11 @@ Other concrete types
.. versionadded:: 3.5.2
.. deprecated:: 3.11
Python 2 is no longer supported, and most type checkers also no longer
support type checking Python 2 code. Users should now use
:class:`str` instead of ``Text`` wherever possible.
Abstract Base Classes
---------------------
@@ -2687,3 +2692,5 @@ convenience. This is subject to change, and not all deprecations are listed.
| ``typing`` versions of standard | 3.9 | Undecided | :pep:`585` |
| collections | | | |
+----------------------------------+---------------+-------------------+----------------+
| ``typing.Text`` | 3.11 | Undecided | :gh:`92332` |
+----------------------------------+---------------+-------------------+----------------+
+6
View File
@@ -1202,6 +1202,12 @@ Deprecated
For now, a deprecation warning is raised for such syntax.
(Contributed by Serhiy Storchaka in :gh:`91760`.)
* :class:`typing.Text`, which exists solely to provide compatibility support
between Python 2 and Python 3 code, is now deprecated. Its removal is
currently unplanned, but users are encouraged to use :class:`str` instead
wherever possible.
(Contributed by Alex Waygood in :gh:`92332`.)
Removed
=======
@@ -0,0 +1,2 @@
Deprecate :class:`typing.Text` (removal of the class is currently not
planned). Patch by Alex Waygood.