summaryrefslogtreecommitdiffstats
path: root/Doc/library/2to3.rst
diff options
context:
space:
mode:
authorCarl Meyer <carl@oddbird.net>2020-04-24 18:19:46 (GMT)
committerGitHub <noreply@github.com>2020-04-24 18:19:46 (GMT)
commit503de7149d03bdcc671dcbbb5b64f761bb192b4d (patch)
tree82114dfb3883525435b33c643709136d36745e21 /Doc/library/2to3.rst
parent24ffe705c30e36c82940d75fd1454256634d0b3c (diff)
downloadcpython-503de7149d03bdcc671dcbbb5b64f761bb192b4d.zip
cpython-503de7149d03bdcc671dcbbb5b64f761bb192b4d.tar.gz
cpython-503de7149d03bdcc671dcbbb5b64f761bb192b4d.tar.bz2
bpo-40360: Deprecate lib2to3 module in light of PEP 617 (GH-19663)
Deprecate lib2to3 module in light of PEP 617. We anticipate removal in the 3.12 timeframe.
Diffstat (limited to 'Doc/library/2to3.rst')
-rw-r--r--Doc/library/2to3.rst14
1 files changed, 10 insertions, 4 deletions
diff --git a/Doc/library/2to3.rst b/Doc/library/2to3.rst
index eb4c918..1d7bd26 100644
--- a/Doc/library/2to3.rst
+++ b/Doc/library/2to3.rst
@@ -9,9 +9,7 @@
of *fixers* to transform it into valid Python 3.x code. The standard library
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. :mod:`lib2to3` could also be
-adapted to custom applications in which Python code needs to be edited
-automatically.
+possible to write your own fixers for 2to3.
.. _2to3-using:
@@ -466,9 +464,17 @@ and off individually. They are described here in more detail.
--------------
+.. deprecated:: 3.10
+ Python 3.9 will switch to a PEG parser (see :pep:`617`), and Python 3.10 may
+ include new language syntax that is not parsable by lib2to3's LL(1) parser.
+ The ``lib2to3`` module may be removed from the standard library in a future
+ Python version. Consider third-party alternatives such as `LibCST`_ or
+ `parso`_.
+
.. note::
The :mod:`lib2to3` API should be considered unstable and may change
drastically in the future.
-.. XXX What is the public interface anyway?
+.. _LibCST: https://libcst.readthedocs.io/
+.. _parso: https://parso.readthedocs.io/