https://github.com/python/cpython/commit/3a189af4b203b9b3bd466680161b32016502defb commit: 3a189af4b203b9b3bd466680161b32016502defb branch: main author: donBarbos <donbar...@proton.me> committer: hugovk <1324225+hug...@users.noreply.github.com> date: 2025-03-13T13:22:16+02:00 summary:
gh-93096: Remove CLI interface for `difflib` (#131099) files: A Misc/NEWS.d/next/Library/2025-03-11-20-35-41.gh-issue-93096.Jdt_8a.rst M Doc/library/cmdline.rst M Lib/difflib.py diff --git a/Doc/library/cmdline.rst b/Doc/library/cmdline.rst index 59629b693ba00f..a000eb21845bac 100644 --- a/Doc/library/cmdline.rst +++ b/Doc/library/cmdline.rst @@ -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` diff --git a/Lib/difflib.py b/Lib/difflib.py index c124afdd039559..bc09aa128aa6d9 100644 --- a/Lib/difflib.py +++ b/Lib/difflib.py @@ -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 index 00000000000000..69a261d558ba66 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2025-03-11-20-35-41.gh-issue-93096.Jdt_8a.rst @@ -0,0 +1,2 @@ +Removed undocumented CLI ``python -m difflib``. Use ``python -m doctest +Lib/difflib.py -v`` instead. Patch by Semyon Moroz. _______________________________________________ Python-checkins mailing list -- python-checkins@python.org To unsubscribe send an email to python-checkins-le...@python.org https://mail.python.org/mailman3/lists/python-checkins.python.org/ Member address: arch...@mail-archive.com