]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-46879: Fix incorrect sphinx object names in doc (GH-31615)
authorMartin Fischer <martin@push-f.com>
Thu, 19 May 2022 15:34:58 +0000 (17:34 +0200)
committerGitHub <noreply@github.com>
Thu, 19 May 2022 15:34:58 +0000 (17:34 +0200)
commit2cdd57f119e3b85f1bfd28c7ff040e0d9bcaf115
tree4499a0514a488347f6b98b517f6ae9ae808d1c6d
parent84b86000e2bc32b0fbb6dfb6445a7ffc882067d2
bpo-46879: Fix incorrect sphinx object names in doc (GH-31615)

API members documented in sphinx have an object name, which allow the
documentation to be linked from other projects. Sphinx calculates the
object name by prefixing the current module name to the directive
argument, e.g:

.. module:: foo
.. function:: bar.baz

becomes foo.bar.baz. Since these anchors aren't displayed in the
documentation, some mistakes have crept in, namely the Python stdlib
documentation currently contains the objects:

* asyncio.asyncio.subprocess.DEVNULL
* asyncio.asyncio.subprocess.PIPE
* asyncio.asyncio.subprocess.STDOUT
* asyncio.asyncio.subprocess.Process
* multiprocessing.sharedctypes.multiprocessing.Manager
* xml.etree.ElementTree.xml.etree.ElementInclude

This commit fixes this by making use of the :module: option which
without an argument makes sphinx take the directive argument as is
for the object name (avoiding the prefixing of the current module
name that led to these broken object names).

Co-authored-by: Ɓukasz Langa <lukasz@langa.pl>
Doc/library/asyncio-subprocess.rst
Doc/library/multiprocessing.rst
Doc/library/xml.etree.elementtree.rst