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

Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
bpo-40360: Prepare to deprecate lib2to3.
  • Loading branch information
gpshead committed Apr 22, 2020
commit d2ab48baeac9bf22fd49740c40da296d3a3a5640
11 changes: 11 additions & 0 deletions Doc/library/2to3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
2to3 - Automated Python 2 to 3 code translation
===============================================

.. deprecated:: 3.9
The :mod:`lib2to3` package and related 2to3 tool are pending deprecation
and removal by Python 3.11 or 3.12. We anticipate that a fork of it may
live on as an external package on PyPI as it does have use as a Python to
Python source transformation tool.

.. sectionauthor:: Benjamin Peterson <[email protected]>

2to3 is a Python program that reads Python 2.x source code and applies a series
Expand Down Expand Up @@ -462,6 +468,11 @@ and off individually. They are described here in more detail.
.. moduleauthor:: Collin Winter
.. moduleauthor:: Benjamin Peterson <[email protected]>

.. deprecated:: 3.9
The :mod:`lib2to3` package and related 2to3 tool are pending deprecation
and removal by Python 3.11 or 3.12. We anticipate that a fork of it may
live on as an external package on PyPI.

**Source code:** :source:`Lib/lib2to3/`

--------------
Expand Down
6 changes: 5 additions & 1 deletion Lib/lib2to3/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
#empty
import warnings
warnings.warn(
"lib2to3 is pending deprecation for removal in Python 3.11 or 3.12.",
category=PendingDeprecationWarning)
del warnings