diff options
author | Carl Meyer <carl@oddbird.net> | 2020-04-24 12:19:46 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-24 11:19:46 -0700 |
commit | 503de7149d03bdcc671dcbbb5b64f761bb192b4d (patch) | |
tree | 82114dfb3883525435b33c643709136d36745e21 /Lib | |
parent | 24ffe705c30e36c82940d75fd1454256634d0b3c (diff) | |
download | cpython-git-503de7149d03bdcc671dcbbb5b64f761bb192b4d.tar.gz |
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 'Lib')
-rw-r--r-- | Lib/lib2to3/__init__.py | 9 | ||||
-rw-r--r-- | Lib/test/test___all__.py | 1 |
2 files changed, 9 insertions, 1 deletions
diff --git a/Lib/lib2to3/__init__.py b/Lib/lib2to3/__init__.py index ea30561d83..4224dffef4 100644 --- a/Lib/lib2to3/__init__.py +++ b/Lib/lib2to3/__init__.py @@ -1 +1,8 @@ -#empty +import warnings + + +warnings.warn( + "lib2to3 package is deprecated and may not be able to parse Python 3.10+", + PendingDeprecationWarning, + stacklevel=2, +) diff --git a/Lib/test/test___all__.py b/Lib/test/test___all__.py index c077881511..0ba243ee4e 100644 --- a/Lib/test/test___all__.py +++ b/Lib/test/test___all__.py @@ -17,6 +17,7 @@ class AllTest(unittest.TestCase): names = {} with support.check_warnings( (".* (module|package)", DeprecationWarning), + (".* (module|package)", PendingDeprecationWarning), ("", ResourceWarning), quiet=True): try: |