[Python-checkins] bpo-40360: Make the 2to3 deprecation more obvious. (GH-29064)

ambv webhook-mailer at python.org
Tue Oct 19 14:28:35 EDT 2021


https://github.com/python/cpython/commit/fdbdf3f7359832820a11ece4c4b01581004d6fe7
commit: fdbdf3f7359832820a11ece4c4b01581004d6fe7
branch: main
author: Gregory P. Smith <greg at krypto.org>
committer: ambv <lukasz at langa.pl>
date: 2021-10-19T20:28:27+02:00
summary:

bpo-40360: Make the 2to3 deprecation more obvious. (GH-29064)

files:
M Doc/library/2to3.rst
M Doc/whatsnew/3.11.rst

diff --git a/Doc/library/2to3.rst b/Doc/library/2to3.rst
index 2a13776e29336..9a1644a97c0ae 100644
--- a/Doc/library/2to3.rst
+++ b/Doc/library/2to3.rst
@@ -11,6 +11,11 @@ contains a rich set of fixers that will handle almost all code.  2to3 supporting
 library :mod:`lib2to3` is, however, a flexible and generic library, so it is
 possible to write your own fixers for 2to3.
 
+.. deprecated-removed:: 3.11 3.13
+   The ``lib2to3`` module was marked pending for deprecation in Python 3.9
+   (raising :exc:`PendingDeprecationWarning` on import) and fully deprecated
+   in Python 3.11 (raising :exc:`DeprecationWarning`).  The ``2to3`` tool is
+   part of that.  It will be removed in Python 3.13.
 
 .. _2to3-using:
 
diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst
index 2e57f0cea53db..b583c2f31c4cc 100644
--- a/Doc/whatsnew/3.11.rst
+++ b/Doc/whatsnew/3.11.rst
@@ -308,9 +308,9 @@ CPython bytecode changes
 Deprecated
 ==========
 
-* The :mod:`lib2to3` package is now deprecated and may not be able to parse
-  Python 3.10 or newer. See the :pep:`617` (New PEG parser for CPython).
-  (Contributed by Victor Stinner in :issue:`40360`.)
+* The :mod:`lib2to3` package and ``2to3`` tool are now deprecated and may not
+  be able to parse Python 3.10 or newer. See the :pep:`617` (New PEG parser for
+  CPython).  (Contributed by Victor Stinner in :issue:`40360`.)
 
 * :class:`webbrowser.MacOSX` is deprecated and will be removed in Python 3.13.
   It is untested and undocumented and also not used by webbrowser itself.



More information about the Python-checkins mailing list