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
标题: Many broken :meth: roles in the docs
类型: Stage: patch review
Components: Documentation Versions: Python 3.11, Python 3.10, Python 3.9
process
状态: open Resolution:
Dependencies: 后续:
分配给: docs@python 抄送列表: JelleZijlstra, docs@python, kj
优先级: normal 关键字: patch

JelleZijlstra2022-04-08 03:13 创建。最近一次由 admin2022-04-11 14:59 修改。

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) 日期: 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) 日期: 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) 日期: 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.
历史
日期 用户 动作 参数
2022-04-11 14:59:58admin修改github: 91411
2022-04-08 15:41:25kj修改抄送: + kj
消息: + msg416992
2022-04-08 03:24:32JelleZijlstra修改消息: + msg416957
2022-04-08 03:15:16JelleZijlstra修改keywords: + patch
stage: patch review
pull_requests: + pull_request30435
2022-04-08 03:13:27JelleZijlstra创建