Skip to content

Commit d589a7e

Browse files
authored
bpo-40360: Deprecate the lib2to3 package (GH-28116)
1 parent 679cb47 commit d589a7e

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

Doc/whatsnew/3.11.rst

+3
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,9 @@ Build Changes
276276
Deprecated
277277
==========
278278

279+
* The :mod:`lib2to3` package is now deprecated and may not be able to parse
280+
Python 3.10 or newer. See the :pep:`617` (New PEG parser for CPython).
281+
(Contributed by Victor Stinner in :issue:`40360`.)
279282

280283

281284
Removed

Lib/lib2to3/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33

44
warnings.warn(
55
"lib2to3 package is deprecated and may not be able to parse Python 3.10+",
6-
PendingDeprecationWarning,
6+
DeprecationWarning,
77
stacklevel=2,
88
)

Lib/test/test_lib2to3.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from test.support.import_helper import import_fresh_module
33
from test.support.warnings_helper import check_warnings
44

5-
with check_warnings(("", PendingDeprecationWarning)):
5+
with check_warnings(("", DeprecationWarning)):
66
load_tests = import_fresh_module('lib2to3.tests', fresh=['lib2to3']).load_tests
77

88
if __name__ == '__main__':
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
The :mod:`lib2to3` package is now deprecated and may not be able to parse
2+
Python 3.10 or newer. See the :pep:`617` (New PEG parser for CPython). Patch
3+
by Victor Stinner.

0 commit comments

Comments
 (0)