-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
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
Fix Sphinx warnings in the C API documentation #107298
Comments
I extracted these comments from the CI job to generate warnings locally: set -Eeuo pipefail
# Build docs with the '-n' (nit-picky) option; write warnings to file
make -C Doc/ PYTHON=../python SPHINXOPTS="-q -n -W --keep-going -w sphinx-warnings.txt" html
python Doc/tools/check-warnings.py \
--fail-if-regression \
--fail-if-improved |
See also #107298 as an umbrella issue for Sphinx warnings. |
…references Add targets for PyStructSequence_Desc and PyStructSequence_Field members and macros like Py_EQ. Fix target for Py_RETURN_RICHCOMPARE.
…references Add targets for PyStructSequence_Desc and PyStructSequence_Field members and macros like Py_EQ. Fix target for Py_RETURN_RICHCOMPARE.
…references Add targets for PyStructSequence_Desc and PyStructSequence_Field members and macros like Py_EQ. Fix target for Py_RETURN_RICHCOMPARE.
Wait, is it the number of this issue? I'm now confused. |
* Update Doc/tools/.nitignore * Fix BufferedIOBase.write() link in buffer.rst
* Update Doc/tools/.nitignore * Fix BufferedIOBase.write() link in buffer.rst
* Update Doc/tools/.nitignore * Fix BufferedIOBase.write() link in buffer.rst
Declare PyObject_New() and PyObject_NewVar() as macros, since they are macros: it avoids a warning on the non existent "TYPE" type name.
Declare the following functions as macros, since they are actually macros. it avoids a warning on the non existent "TYPE" type name. * PyMem_New() * PyMem_Resize() * PyModule_AddIntMacro() * PyModule_AddStringMacro() * PyObject_GC_New() * PyObject_GC_NewVar() * PyObject_New() * PyObject_NewVar() Add C standard C types to nitpick_ignore in Doc/conf.py: * int64_t * uint64_t * uintptr_t No longer ignore non existing "__int" type in nitpick_ignore. Update Doc/tools/.nitignore
Declare the following functions as macros, since they are actually macros. It avoids a warning on "TYPE" or "macro" argument. * PyMem_New() * PyMem_Resize() * PyModule_AddIntMacro() * PyModule_AddStringMacro() * PyObject_GC_New() * PyObject_GC_NewVar() * PyObject_New() * PyObject_NewVar() Add C standard C types to nitpick_ignore in Doc/conf.py: * int64_t * uint64_t * uintptr_t No longer ignore non existing "__int" type in nitpick_ignore. Update Doc/tools/.nitignore
…07300) Update also Doc/tools/.nitignore.
…ythonGH-108258) (cherry picked from commit d7202e4) Co-authored-by: Serhiy Storchaka <[email protected]>
…I docs (pythonGH-108258). (cherry picked from commit d7202e4) Co-authored-by: Serhiy Storchaka <[email protected]>
…GH-108258) (#108284) gh-107298: Fix numerous ref errors and typos in the C API docs (GH-108258) (cherry picked from commit d7202e4) Co-authored-by: Serhiy Storchaka <[email protected]>
(cherry picked from commit d63972e) Co-authored-by: Serhiy Storchaka <[email protected]>
…GH-108258) (#108290) (cherry picked from commit d7202e4)
I updated lists after fixing some warnings and excluded references from NEWS and automatically generated lists of all C API names. |
Document PyAPI_DATA(), and PyAPI_FUNC() and PyMODINIT_FUNC macros in Doc/c-api/intro.rst. This change fix Sphinx warnings in Doc/using/configure.rst.
Remove links to PyAPI_FUNC(), PyAPI_DATA() and PyMODINIT_FUNC macros since they are not documented. These macros should only be used to define the Python C API. They should not be used outside Python code base.
Remove links to PyAPI_FUNC(), PyAPI_DATA() and PyMODINIT_FUNC macros since they are not documented. These macros should only be used to define the Python C API. They should not be used outside Python code base.
Remove links to PyAPI_FUNC() and PyAPI_DATA() macros since they are not documented. These macros should only be used to define the Python C API. They should not be used outside Python code base. Document PyMODINIT_FUNC macro.
Remove links to PyAPI_FUNC() and PyAPI_DATA() macros since they are not documented. These macros should only be used to define the Python C API. They should not be used outside Python code base. Document PyMODINIT_FUNC macro.
The number of Sphinx warnings in the C API documentation is way lower! I'm no longer annoyed by Sphinx warnings unrelated to my changes when I modify C code and/or C API documentation! Thanks everybody who helped to fix these warnings. I close this issue. |
Remove links to PyAPI_FUNC() and PyAPI_DATA() macros since they are not documented. These macros should only be used to define the Python C API. They should not be used outside Python code base. Document PyMODINIT_FUNC macro.
Document PyMODINIT_FUNC macro. Remove links to PyAPI_FUNC() and PyAPI_DATA() macros since they are not documented. These macros should only be used to define the Python C API. They should not be used outside Python code base.
Document PyMODINIT_FUNC macro. Remove links to PyAPI_FUNC() and PyAPI_DATA() macros since they are not documented. These macros should only be used to define the Python C API. They should not be used outside Python code base. (cherry picked from commit d7a27e5) Co-authored-by: Victor Stinner <[email protected]>
gh-107298: Document PyMODINIT_FUNC macro (#109236) Document PyMODINIT_FUNC macro. Remove links to PyAPI_FUNC() and PyAPI_DATA() macros since they are not documented. These macros should only be used to define the Python C API. They should not be used outside Python code base. (cherry picked from commit d7a27e5)
gh-107298: Document PyMODINIT_FUNC macro (GH-109236) Document PyMODINIT_FUNC macro. Remove links to PyAPI_FUNC() and PyAPI_DATA() macros since they are not documented. These macros should only be used to define the Python C API. They should not be used outside Python code base. (cherry picked from commit d7a27e5) Co-authored-by: Victor Stinner <[email protected]>
Recently, I saw a growing numbers of Sphinx warnings displayed as annotations which make reviews harder.
I create this issue to track changes fixing warnings.
See also gh-106948 which populates
nitpick_ignore
ofDoc/conf.py
with standard C functions, variables, macros and env vars.Linked PRs
The text was updated successfully, but these errors were encountered: