Skip to content

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

Closed
@encukou

Description

@encukou

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?

Metadata

Metadata

Assignees

Labels

docsDocumentation in the Doc dir

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions