This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Many broken :meth: roles in the docs
Type: Stage: patch review
Components: Documentation Versions: Python 3.11, Python 3.10, Python 3.9
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: JelleZijlstra, docs@python, kj
Priority: normal Keywords: patch

Created on 2022-04-08 03:13 by JelleZijlstra, last changed 2022-04-11 14:59 by admin.

Pull Requests
URL Status Linked Edit
PR 32409 open JelleZijlstra, 2022-04-08 03:15
Messages (3)
msg416956 - (view) Author: Jelle Zijlstra (JelleZijlstra) * (Python committer) Date: 2022-04-08 03:13
The docs for the hash() builtin use :meth:`__hash__`, but this doesn't actually link to the datamodel documentation for __hash__: it needs :meth:`~object.__hash__` instead.

I'm fixing this in the builtin functions docs, but there are probably more places.

Why don't we warn when a :meth: link doesn't actually create a link?
msg416957 - (view) Author: Jelle Zijlstra (JelleZijlstra) * (Python committer) Date: 2022-04-08 03:24
There are a lot of places in the rest of the docs that have the same problem:

Doc % git grep ':meth:`__' | grep -v whatsnew | wc -l
     610

I wonder if we can make the :meth: role globally default to linking to object.__dunder__. Would that require a change to Sphinx?
msg416992 - (view) Author: Ken Jin (kj) * (Python committer) Date: 2022-04-08 15:41
It's 3.10 only. Presumably our sphinx version changed then and something broke. In 3.9 and earlier the links are all fine.

See https://bugs.python.org/issue42182 for a similar issue I raised ages ago.
History
Date User Action Args
2022-04-11 14:59:58adminsetgithub: 91411
2022-04-08 15:41:25kjsetnosy: + kj
messages: + msg416992
2022-04-08 03:24:32JelleZijlstrasetmessages: + msg416957
2022-04-08 03:15:16JelleZijlstrasetkeywords: + patch
stage: patch review
pull_requests: + pull_request30435
2022-04-08 03:13:27JelleZijlstracreate