Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.11] bpo-46879: Fix incorrect sphinx object names in doc (GH-31615) #92974

Merged
merged 1 commit into from May 19, 2022

Conversation

miss-islington
Copy link
Contributor

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
(cherry picked from commit 2cdd57f)

Co-authored-by: Martin Fischer martin@push-f.com

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>
(cherry picked from commit 2cdd57f)

Co-authored-by: Martin Fischer <martin@push-f.com>
@miss-islington
Copy link
Contributor Author

Status check is done, and it's a success ✅ .

1 similar comment
@miss-islington
Copy link
Contributor Author

Status check is done, and it's a success ✅ .

@miss-islington
Copy link
Contributor Author

Status check is done, and it's a success ✅ .

@bedevere-bot bedevere-bot added skip news docs Documentation in the Doc dir labels May 19, 2022
@miss-islington
Copy link
Contributor Author

Status check is done, and it's a success ✅ .

@miss-islington
Copy link
Contributor Author

Status check is done, and it's a success ✅ .

1 similar comment
@miss-islington
Copy link
Contributor Author

Status check is done, and it's a success ✅ .

@ambv ambv merged commit 27302ae into python:3.11 May 19, 2022
@miss-islington miss-islington deleted the backport-2cdd57f-3.11 branch May 19, 2022 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants