]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-40360: Deprecate the lib2to3 package (GH-28116)
authorVictor Stinner <vstinner@python.org>
Thu, 2 Sep 2021 09:46:47 +0000 (11:46 +0200)
committerGitHub <noreply@github.com>
Thu, 2 Sep 2021 09:46:47 +0000 (11:46 +0200)
Doc/whatsnew/3.11.rst
Lib/lib2to3/__init__.py
Lib/test/test_lib2to3.py
Misc/NEWS.d/next/Library/2021-09-02-00-18-32.bpo-40360.9nmMtB.rst [new file with mode: 0644]

index 1b736c71c24fbef086666d8ea811d92065b1d296..8f0f6f83c012a7ab4b6febcc90b0c61ac5b91a85 100644 (file)
@@ -276,6 +276,9 @@ Build Changes
 Deprecated
 ==========
 
+* The :mod:`lib2to3` package is now deprecated and may not be able to parse
+  Python 3.10 or newer. See the :pep:`617` (New PEG parser for CPython).
+  (Contributed by Victor Stinner in :issue:`40360`.)
 
 
 Removed
index 4224dffef429570a3aaca3c1cc3a258a8f322251..177405c8090d3e1f1b68b79c9300ee1a775fe52d 100644 (file)
@@ -3,6 +3,6 @@ import warnings
 
 warnings.warn(
     "lib2to3 package is deprecated and may not be able to parse Python 3.10+",
-    PendingDeprecationWarning,
+    DeprecationWarning,
     stacklevel=2,
 )
index fd12a7e7acbb46bee989cceef7b6c5361eaa26f3..6ea8aa4a56e52e5df1435153a94b50e886f2aa25 100644 (file)
@@ -2,7 +2,7 @@ import unittest
 from test.support.import_helper import import_fresh_module
 from test.support.warnings_helper import check_warnings
 
-with check_warnings(("", PendingDeprecationWarning)):
+with check_warnings(("", DeprecationWarning)):
     load_tests = import_fresh_module('lib2to3.tests', fresh=['lib2to3']).load_tests
 
 if __name__ == '__main__':
diff --git a/Misc/NEWS.d/next/Library/2021-09-02-00-18-32.bpo-40360.9nmMtB.rst b/Misc/NEWS.d/next/Library/2021-09-02-00-18-32.bpo-40360.9nmMtB.rst
new file mode 100644 (file)
index 0000000..4e9422d
--- /dev/null
@@ -0,0 +1,3 @@
+The :mod:`lib2to3` package is now deprecated and may not be able to parse
+Python 3.10 or newer. See the :pep:`617` (New PEG parser for CPython). Patch
+by Victor Stinner.