-
-
Notifications
You must be signed in to change notification settings - Fork 30.6k
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
gh-97908: CAPI docs: Remove repeated struct names from member docs #100054
Conversation
(I've included and reverted a hack to find these. I don't think it's worth keeping, at least without better error reporting. Eventually I hope we'll grow general checks that docs correspond to code.) |
✅ Deploy Preview for python-cpython-preview ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
These were only marked up in 3.12 (pythongh-97909), so they don't need backcompat backflips.
I can think of a few practical solutions here that should work, that would be cross-builder, less hacky, and more concise, clean and precise, and should be able to fix internal and intersphinx references as well:
I have some meetings now, but I'll explore these further and report back later tonight |
Sounds good! But it also sounds like it could use a longer discussion, since there's no obvious better way :( Unless there's a problem with |
Yeah, I guess that makes the most sense, unless @AA-Turner has a better solution—I intended to get to it yesterday, but I've been busy since then helping students with their Python final projects, so I haven't had the chance to continue to dig into it and prototype something. |
Thanks @encukou for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12. |
…ocs (pythonGH-100054) And add raw HTML fragments to keep old links working. (cherry picked from commit 1668b41) Co-authored-by: Petr Viktorin <[email protected]>
GH-105057 is a backport of this pull request to the 3.12 branch. |
…docs (GH-100054) (#105057) And add raw HTML fragments to keep old links working. (cherry picked from commit 1668b41) Co-authored-by: Petr Viktorin <[email protected]>
Members with repeated struct names were interpreted as e.g.
PyType_Spec.PyType_Spec.name
,showing up incorrectly wrong in the search and index, and complicating automation.
This removes the duplicated names, but keeps old HTML anchors so that external links continue to work.
I don't see a better way than raw HTML to add custom anchors with dots.
Most
PyMemberDef
fields were already fixed in GH-99014,old anchors are added for those too.Edit:
PyMemberDef
andPyGetSetDef
were only marked up in 3.12 (gh-97909), so they don't need “old” URL anchors.