Skip to content

Commit cae8ec8

Browse files
gh-153906: Modernize pydoc HTML output (GH-153909)
Follow-up of the HTML5 migration in bpo-10716: replace the layout tables, the &nbsp;/<br> encoding of docstrings and the obsolete <a name=...> anchors with semantic markup (header, section, h1-h4, CSS multi-column lists, white-space: pre-wrap, id= anchors), and restyle the pages after the python-docs-theme used by docs.python.org, including dark mode support. Members inherited from other classes are now collapsed by default. The pydoc API is unchanged; obsolete arguments of HTMLDoc methods are accepted and ignored. ServerHTMLDoc in xmlrpc.server is updated to match. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 426cf84 commit cae8ec8

7 files changed

Lines changed: 380 additions & 222 deletions

File tree

Doc/whatsnew/3.16.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,17 @@ os
365365
(Contributed by Maurycy Pawłowski-Wieroński in :gh:`149464`.)
366366

367367

368+
pydoc
369+
-----
370+
371+
* Modernize the HTML output of :mod:`pydoc`. The pages generated by the
372+
:mod:`pydoc` HTTP server now use semantic HTML5 markup and a new style
373+
sheet based on the python-docs-theme used by `docs.python.org
374+
<https://docs.python.org/>`__, with dark mode support. Class members
375+
inherited from other classes are collapsed by default.
376+
(Contributed by Serhiy Storchaka in :gh:`153906`.)
377+
378+
368379
re
369380
--
370381

0 commit comments

Comments
 (0)