From 83a1f7a54e4b229ef5ff88bad349b782a424dfc8 Mon Sep 17 00:00:00 2001 From: Fidget-Spinner <28750310+Fidget-Spinner@users.noreply.github.com> Date: Sat, 21 Aug 2021 22:28:39 +0800 Subject: [PATCH 1/3] Add note about deprecationwarning and tell users how to upgrade --- Doc/whatsnew/3.10.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst index ae6ad9c52ccade..c8747576136a75 100644 --- a/Doc/whatsnew/3.10.rst +++ b/Doc/whatsnew/3.10.rst @@ -1401,6 +1401,12 @@ subclasses with the :func:`runtime_checkable` decorator if they want runtime protocols. (Contributed by Yurii Karabas in :issue:`38908`) +Importing from the ``typing.io`` and ``typing.re`` submodules will now emit +:exc:`DeprecationWarning`. These submodules have been deprecated since +Python 3.8. Anything previously belonging to those submodules should be +imported directly from :mod:`typing` instead. +(Contributed by Sebastian Rittau in :issue:`38291`) + unittest -------- From ca373b88a39e2374d03bcad80c7df044c04efd7b Mon Sep 17 00:00:00 2001 From: Fidget-Spinner <28750310+Fidget-Spinner@users.noreply.github.com> Date: Sat, 21 Aug 2021 22:30:29 +0800 Subject: [PATCH 2/3] tighten wording --- Doc/whatsnew/3.10.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst index c8747576136a75..423cadf9572b4c 100644 --- a/Doc/whatsnew/3.10.rst +++ b/Doc/whatsnew/3.10.rst @@ -1403,8 +1403,9 @@ if they want runtime protocols. Importing from the ``typing.io`` and ``typing.re`` submodules will now emit :exc:`DeprecationWarning`. These submodules have been deprecated since -Python 3.8. Anything previously belonging to those submodules should be -imported directly from :mod:`typing` instead. +Python 3.8 and will be removed in a future version of Python. Anything +belonging to those submodules should be imported directly from +:mod:`typing` instead. (Contributed by Sebastian Rittau in :issue:`38291`) unittest From cd4569cdfe3a2c9746c74be7d954f3bf9d871f05 Mon Sep 17 00:00:00 2001 From: Fidget-Spinner <28750310+Fidget-Spinner@users.noreply.github.com> Date: Sun, 22 Aug 2021 08:43:59 +0800 Subject: [PATCH 3/3] update deprecated section --- Doc/whatsnew/3.10.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst index 423cadf9572b4c..6040daaf8f846d 100644 --- a/Doc/whatsnew/3.10.rst +++ b/Doc/whatsnew/3.10.rst @@ -1703,6 +1703,12 @@ Deprecated requires a :ref:`debug build of Python `. (Contributed by Victor Stinner in :issue:`44584`.) +* Importing from the ``typing.io`` and ``typing.re`` submodules will now emit + :exc:`DeprecationWarning`. These submodules will be removed in a future version + of Python. Anything belonging to these submodules should be imported directly + from :mod:`typing` instead. + (Contributed by Sebastian Rittau in :issue:`38291`) + .. _whatsnew310-removed: Removed