]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-93096: Remove CLI interface for `difflib` (#131099)
authordonBarbos <donbarbos@proton.me>
Thu, 13 Mar 2025 11:22:16 +0000 (15:22 +0400)
committerGitHub <noreply@github.com>
Thu, 13 Mar 2025 11:22:16 +0000 (13:22 +0200)
Doc/library/cmdline.rst
Lib/difflib.py
Misc/NEWS.d/next/Library/2025-03-11-20-35-41.gh-issue-93096.Jdt_8a.rst [new file with mode: 0644]

index 59629b693ba00fd3feefdae1474d04bd0fab5b81..a000eb21845bacae4277d04f4e410064ae7527b3 100644 (file)
@@ -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`
index c124afdd0395597d42debd320fb04dcb97b55f94..bc09aa128aa6d98d8290d83f0dd048d04a96ea68 100644 (file)
@@ -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()
diff --git a/Misc/NEWS.d/next/Library/2025-03-11-20-35-41.gh-issue-93096.Jdt_8a.rst b/Misc/NEWS.d/next/Library/2025-03-11-20-35-41.gh-issue-93096.Jdt_8a.rst
new file mode 100644 (file)
index 0000000..69a261d
--- /dev/null
@@ -0,0 +1,2 @@
+Removed undocumented CLI ``python -m difflib``. Use ``python -m doctest
+Lib/difflib.py -v`` instead. Patch by Semyon Moroz.