Skip to content

gh-93096: Remove CLI interface for difflib #131099

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 13, 2025
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
1 change: 0 additions & 1 deletion Doc/library/cmdline.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ The following modules have a command-line interface.
* :mod:`code`
* :ref:`compileall <compileall-cli>`
* :mod:`cProfile`: see :ref:`profile <profile-cli>`
* :ref:`difflib <difflib-interface>`
* :ref:`dis <dis-cli>`
* :mod:`doctest`
* :mod:`!encodings.rot_13`
Expand Down
7 changes: 0 additions & 7 deletions Lib/difflib.py
Original file line number Diff line number Diff line change
Expand Up @@ -2060,10 +2060,3 @@ def restore(delta, which):
for line in delta:
if line[:2] in prefixes:
yield line[2:]

def _test():
import doctest, difflib
return doctest.testmod(difflib)

if __name__ == "__main__":
_test()
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Removed undocumented CLI ``python -m difflib``. Use ``python -m doctest
Lib/difflib.py -v`` instead. Patch by Semyon Moroz.
Loading