https://github.com/python/cpython/commit/c888d6b4a04db90dd3a6d9b289ccf815aec34e1b commit: c888d6b4a04db90dd3a6d9b289ccf815aec34e1b branch: 3.14 author: Miss Islington (bot) <[email protected]> committer: StanFromIreland <[email protected]> date: 2026-11-05T21:39:13Z summary:
[3.14] gh-161414: Remove the backquote from the `pydoc` symbols (GH-161416) (#161439) (cherry picked from commit d003448092a043f7bd4b604b210bd682910de6d6) Co-authored-by: Andrés Delfino <[email protected]> Co-authored-by: sobolevn <[email protected]> Co-authored-by: Stan Ulbrych <[email protected]> files: A Misc/NEWS.d/next/Library/2026-11-05-11-59-58.gh-issue-161414.Xnxe8A.rst M Lib/pydoc.py M Lib/test/test_pydoc/test_pydoc.py diff --git a/Lib/pydoc.py b/Lib/pydoc.py index 51721186b3f84ed..c748b3132d4e8b4 100644 --- a/Lib/pydoc.py +++ b/Lib/pydoc.py @@ -1932,7 +1932,6 @@ class Helper: ':=': 'ASSIGNMENTEXPRESSIONS', '_': 'PRIVATENAMES', '__': 'PRIVATENAMES SPECIALMETHODS', - '`': 'BACKQUOTES', '(': 'TUPLES FUNCTIONS CALLS', ')': 'TUPLES FUNCTIONS CALLS', '[': 'LISTS SUBSCRIPTS SLICINGS', diff --git a/Lib/test/test_pydoc/test_pydoc.py b/Lib/test/test_pydoc/test_pydoc.py index 139bdd218e67b61..61974f50ba262fe 100644 --- a/Lib/test/test_pydoc/test_pydoc.py +++ b/Lib/test/test_pydoc/test_pydoc.py @@ -2239,6 +2239,14 @@ def test_keywords(self): self.assertEqual(sorted(pydoc.Helper.keywords), sorted(keyword.kwlist + ['case', 'match'])) + def test_symbols(self): + # gh-161414 + for symbol in pydoc.Helper.symbols: + with self.subTest(symbol=symbol): + buf = StringIO() + pydoc.Helper(output=buf).showsymbol(symbol) + self.assertNotIn('no documentation found', buf.getvalue()) + def test_interact_empty_line_continues(self): # gh-138568: test pressing Enter without input should continue in help session self.assertEqual( diff --git a/Misc/NEWS.d/next/Library/2026-11-05-11-59-58.gh-issue-161414.Xnxe8A.rst b/Misc/NEWS.d/next/Library/2026-11-05-11-59-58.gh-issue-161414.Xnxe8A.rst new file mode 100644 index 000000000000000..7536c5c25a13f5b --- /dev/null +++ b/Misc/NEWS.d/next/Library/2026-11-05-11-59-58.gh-issue-161414.Xnxe8A.rst @@ -0,0 +1,2 @@ +Remove the backquote from the symbols listed by :func:`help`, asking for help on it reported that no +documentation was found. _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/python-checkins.python.org Member address: [email protected]
