Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fdbdf3f

Browse files
authored
bpo-40360: Make the 2to3 deprecation more obvious. (GH-29064)
1 parent 7bafa0c commit fdbdf3f

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

Doc/library/2to3.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ contains a rich set of fixers that will handle almost all code. 2to3 supporting
1111
library :mod:`lib2to3` is, however, a flexible and generic library, so it is
1212
possible to write your own fixers for 2to3.
1313

14+
.. deprecated-removed:: 3.11 3.13
15+
The ``lib2to3`` module was marked pending for deprecation in Python 3.9
16+
(raising :exc:`PendingDeprecationWarning` on import) and fully deprecated
17+
in Python 3.11 (raising :exc:`DeprecationWarning`). The ``2to3`` tool is
18+
part of that. It will be removed in Python 3.13.
1419

1520
.. _2to3-using:
1621

Doc/whatsnew/3.11.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -308,9 +308,9 @@ CPython bytecode changes
308308
Deprecated
309309
==========
310310

311-
* The :mod:`lib2to3` package is now deprecated and may not be able to parse
312-
Python 3.10 or newer. See the :pep:`617` (New PEG parser for CPython).
313-
(Contributed by Victor Stinner in :issue:`40360`.)
311+
* The :mod:`lib2to3` package and ``2to3`` tool are now deprecated and may not
312+
be able to parse Python 3.10 or newer. See the :pep:`617` (New PEG parser for
313+
CPython). (Contributed by Victor Stinner in :issue:`40360`.)
314314

315315
* :class:`webbrowser.MacOSX` is deprecated and will be removed in Python 3.13.
316316
It is untested and undocumented and also not used by webbrowser itself.

0 commit comments

Comments
 (0)