GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — METH_* and Py_TPFLAGS* constants are documented as Python data · Issue #96996 · python/cpython

METH_* and Py_TPFLAGS* constants are documented as Python data #96996

New issue
Copy link
New issue
Copy link
Closed
Closed
METH_* and Py_TPFLAGS* constants are documented as Python data#96996
Copy link
Assignees
encukou
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dir

Description

@encukou
encukou
opened on Sep 21, 2022
Issue body actions

For example, a search for Py_TPFLAGS says it's all “Python data”:

image

Same with METH_.

I guess this should be changed to c:macro:. It doesn't change URLs, but it would break references and Intersphinx links in third-party docs.
And there's a lot of references to these items that use :const: rather than :c:macro:. All of them would need to change, possibly causing conflicts in backports.


An additional issue is flag combinations in structures.rst:

.. data:: METH_VARARGS

   This is the typical calling convention, where[...]


.. data:: METH_VARARGS | METH_KEYWORDS

   Methods with these flags must [...]

These should look like items of the same category to the reader, but one is a valid c:macro and the other isn't.

Sphinx experts, any tips on how (and whether) to best fix this?

Activity

  1. encukou
    added
    docsDocumentation in the Doc dirDocumentation in the Doc dir
    on Sep 21, 2022
  2. CAM-Gerlach commented on Sep 26, 2022

    @CAM-Gerlach
    CAM-Gerlach
    on Sep 26, 2022
    Member
    More actions

    Sphinx experts, any tips on how (and whether) to best fix this?

    @AA-Turner is one of the most knowledgeable people on these changes, since he was the one to propose a related set of them in #93738 that have similar effects. This ultimately seems to be more of a strict defect in the CPython docs source than that, though, as the objects are currently not categorized correctly.

    As mentioned during the meeting, external links should still work, as the anchors should still be the same. Internal references will need to be updated, and unfortunately I'm not aware of any obvious mechanism to redirect old references (particularly for Intersphinx users, since internal uses can fairly easily update)— @AA-Turner , is there any chance of something like that? However, as long as they are using -n in their builds as they should be, it will let them know exactly what and where they need to update, and it will be a one-time change to fix what would otherwise be an enduring and potentially confusing defect (especially if they are migrated directly to the modern C syntax), so at least to me it seems worthwhile in the long run.

    Regarding backporting, not doing so would lead to more conflicts over time and would mean existing docs would not benefit from this defect fix, but on the other hand, not backporting to at least 3.10 would minimize any backward compat concerns (since there are many other changes users expect and need to adapt to between Python docs versions anyway).

  3. AA-Turner commented on Oct 3, 2022

    @AA-Turner
    AA-Turner
    on Oct 3, 2022
    Member
    More actions

    There's no way I'm aware of to mitigate this within Sphinx, I think we may just have to bite the bullet and make the changes--best time to plant a tree and all that.

    We should though socialise that we are making these changes -- discussion in various documentation fora at the very least.

    A

  4. encukou commented on Oct 5, 2022

    @encukou
    encukou
    on Oct 5, 2022
    MemberAuthor
    More actions

    FWIW, a similar issue is: #97908 (Docs for some C struct members repeat the struct name)

  5. CAM-Gerlach commented on Oct 5, 2022

    @CAM-Gerlach
    CAM-Gerlach
    on Oct 5, 2022
    Member
    More actions

    FWIW, since this appears it will only break Intersphinx references, it produces a warning (with -n) and will visibly not resolve as a link in the rendered docs, so there will be some visibility already there whenever it happens, without people having to update their docs manually.

  6. CAM-Gerlach commented on Oct 5, 2022

    @CAM-Gerlach
    CAM-Gerlach
    on Oct 5, 2022
    Member
    More actions

    To note, in that issue the fragments visible to external links will change, unless we add ref target labels with the old name.

  7. encukou
    self-assigned this
    on Dec 6, 2022
  8. encukou commented on Aug 2, 2023

    @encukou
    encukou
    on Aug 2, 2023
    MemberAuthor
    More actions

    #106919 fixed this, without preserving the URL fragments and external intersphinx references or advertising the changes.
    I currently don't have bandwith to do those. If I (or someone else) don't find time by 3.11.0, we'll need to live with it.

  9. erlend-aasland commented on Jan 15, 2024

    @erlend-aasland
    erlend-aasland
    on Jan 15, 2024
    Contributor
    More actions

    If I (or someone else) don't find time by 3.11.0, we'll need to live with it.

    Both 3.11.0 and 3.12.0 have been released; seems we had to live without those advertisements. AFAIK, we did not advertise other similar Sphinx markup corrections. Suggesting to close this.

  10. encukou
    closed this as completedon Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @encukou
    encukou

Labels

docsDocumentation in the Doc dirDocumentation in the Doc dir

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402520 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.