FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

bpo-40360: Prepare to deprecate lib2to3. by gpshead · Pull Request #19645 · python/cpython · GitHub

/ cpython Public
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (1) .rst  (2) All 2 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
11 changes: 11 additions & 0 deletions Doc/library/2to3.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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 <benjamin@python.org>

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 <benjamin@python.org>

.. 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
lib2to3 and the 2to3 tool gain a PendingDeprecationWarning, slated for
removal in 3.11 or 3.12.

Back | FazBrowse Home | New Git URL