Skip to content

Commit 559af74

Browse files
miss-islingtonambv
andauthored
bpo-40360: [doc] Rephrase deprecation note about lib2to3 (GH-28122)
(cherry picked from commit f0b63d5) Co-authored-by: Łukasz Langa <lukasz@langa.pl>
1 parent 3d56272 commit 559af74

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

Doc/library/2to3.rst

+9-6
Original file line numberDiff line numberDiff line change
@@ -464,12 +464,15 @@ and off individually. They are described here in more detail.
464464

465465
--------------
466466

467-
.. deprecated:: 3.10
468-
Python 3.9 will switch to a PEG parser (see :pep:`617`), and Python 3.10 may
469-
include new language syntax that is not parsable by lib2to3's LL(1) parser.
470-
The ``lib2to3`` module may be removed from the standard library in a future
471-
Python version. Consider third-party alternatives such as `LibCST`_ or
472-
`parso`_.
467+
.. deprecated-removed:: 3.11 3.13
468+
Python 3.9 switched to a PEG parser (see :pep:`617`) while lib2to3 is
469+
using a less flexible LL(1) parser. Python 3.10 includes new language
470+
syntax that is not parsable by lib2to3's LL(1) parser (see :pep:`634`).
471+
The ``lib2to3`` module was marked pending for deprecation in Python 3.9
472+
(raising :exc:`PendingDeprecationWarning` on import) and fully deprecated
473+
in Python 3.11 (raising :exc:`DeprecationWarning`).
474+
It will be removed from the standard library in Python 3.13.
475+
Consider third-party alternatives such as `LibCST`_ or `parso`_.
473476

474477
.. note::
475478

0 commit comments

Comments
 (0)