Sitelet https://github.com/python/cpython/issues/97740
Skip to content

Doc: Fix ! in C domain ref target syntax #97740

Description

@CAM-Gerlach

! doesn't appear to work as documented in the C domain (to not try to resolve references) in the CPython docs building on 4.5.0. That means there's no way to not link subsequent instances of a reference to a C domain item, or refer to an item that isn't defined (e.g. for removed or undocumented APIs in the What's New, where it is used heavily) without either using the syntactically, semantically and stylistically inconsistent literal syntax (or, for non-existent entries, attempting to resolve known broken references and generating spurious warnings).

Thanks to @AA-Turner 's helpful investigation, it looks like this is:

an implementation error in CXRefRole.run() means that if c_allow_pre_v3 is True then the value of .disabled is ignored, hence the ! is not taken into account.

At some point soon we need to upgrade the docs to the latest Sphinx to pick up a number of significant features and bug fixes that have been implemented specifically for our docs, and we also need to migrate off c_allow_pre_v3 which I understand @AA-Turner is also working on. However, there is an immediate stopgap fix to get things working immediately, including on older docs—we can add a bit of code in our conf.py to avoid the issue. I'll submit a PR.

Activity

  1. self-assigned this
    on Oct 2, 2022
  2. added 2 commits that reference this issue on Oct 2, 2022
  3. AA-Turner commented on Oct 2, 2022

    @AA-Turner
    Member

    This is being fixed upstream in Sphinx 5.3, to confirm--thanks to Cam for raising the error.

    A

  4. moved this to Todo in Sprinton Oct 3, 2022
  5. added a commit that references this issue on Oct 3, 2022
  6. added 2 commits that reference this issue on Oct 3, 2022
  7. moved this from Todo to In Progress in Sprinton Oct 3, 2022
  8. added 2 commits that reference this issue on Oct 3, 2022
  9. Repository owner moved this from In Progress to Done in Sprinton Oct 3, 2022
  10. CAM-Gerlach commented on Oct 3, 2022

    @CAM-Gerlach
    MemberAuthor

    Thanks to @AA-Turner for doing most of the work to help fix it both here and there!

  11. added a commit that references this issue on Oct 3, 2022
  12. added a commit that references this issue on Oct 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

docsDocumentation in the Doc dir

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions