bpo-40360: Deprecate lib2to3 module in light of PEP 617 by carljm · Pull Request #19663 · python/cpython · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
14 changes: 10 additions & 4 deletions Doc/library/2to3.rst
9 changes: 8 additions & 1 deletion Lib/lib2to3/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
#empty
import warnings


warnings.warn(
"lib2to3 package is deprecated and may not be able to parse Python 3.10+",
PendingDeprecationWarning,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was under the impression that we don't use PendingDeprecationWarning any more: https://bugs.python.org/issue36404

stacklevel=2,
)
1 change: 1 addition & 0 deletions Lib/test/test___all__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ def check_all(self, modname):
names = {}
with support.check_warnings(
(".* (module|package)", DeprecationWarning),
(".* (module|package)", PendingDeprecationWarning),
("", ResourceWarning),
quiet=True):
try:
Expand Down