Skip to content

Commit 3a189af

Browse files
authored
gh-93096: Remove CLI interface for difflib (#131099)
1 parent 328f8b8 commit 3a189af

File tree

3 files changed

+2
-8
lines changed

3 files changed

+2
-8
lines changed

Doc/library/cmdline.rst

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ The following modules have a command-line interface.
1111
* :mod:`code`
1212
* :ref:`compileall <compileall-cli>`
1313
* :mod:`cProfile`: see :ref:`profile <profile-cli>`
14-
* :ref:`difflib <difflib-interface>`
1514
* :ref:`dis <dis-cli>`
1615
* :mod:`doctest`
1716
* :mod:`!encodings.rot_13`

Lib/difflib.py

-7
Original file line numberDiff line numberDiff line change
@@ -2060,10 +2060,3 @@ def restore(delta, which):
20602060
for line in delta:
20612061
if line[:2] in prefixes:
20622062
yield line[2:]
2063-
2064-
def _test():
2065-
import doctest, difflib
2066-
return doctest.testmod(difflib)
2067-
2068-
if __name__ == "__main__":
2069-
_test()
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Removed undocumented CLI ``python -m difflib``. Use ``python -m doctest
2+
Lib/difflib.py -v`` instead. Patch by Semyon Moroz.

0 commit comments

Comments
 (0)