Skip to content

Fix Sphinx warnings on unknown targets - #107164

Closed
vstinner wants to merge 1 commit into
python:mainfrom
vstinner:fix_doc_id
Closed

Fix Sphinx warnings on unknown targets#107164
vstinner wants to merge 1 commit into
python:mainfrom
vstinner:fix_doc_id

Conversation

@vstinner

@vstinnervstinner commented Jul 23, 2023

Copy link
Copy Markdown
Member

Fix warnings like:

  • py:data reference target not found: Py_Version
  • c:func reference target not found: malloc

📚 Documentation preview 📚: https://cpython-previews--107164.org.readthedocs.build/

Fix warnings like:
* py:data reference target not found: Py_Version
* c:func reference target not found: malloc
@erlend-aasland

Copy link
Copy Markdown
Contributor

See also gh-107063

@erlend-aasland

Copy link
Copy Markdown
Contributor

... and gh-107062

@vstinner

Copy link
Copy Markdown
MemberAuthor

Docs / Docs job failed with:

Warning: c:identifier reference target not found: va_list
Warning: c:identifier reference target not found: va_list
Warning: c:identifier reference target not found: va_list

@erlend-aasland

Copy link
Copy Markdown
Contributor

Docs / Docs job failed with:

Warning: c:identifier reference target not found: va_list
Warning: c:identifier reference target not found: va_list
Warning: c:identifier reference target not found: va_list

No, you misread the CI information. This is what you need to fix ;)

Congratulations! You improved:
Doc/c-api/apiabiversion.rst
Please remove from Doc/tools/.nitignore

Comment threadDoc/c-api/arg.rst
for the ``s`` and ``s#`` formats, the required data is copied. Buffers provided
by the caller are never referenced by the objects created by
:c:func:`Py_BuildValue`. In other words, if your code invokes :c:func:`malloc`
:c:func:`Py_BuildValue`. In other words, if your code invokes :c:func:`!malloc`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not needed; malloc is in the nitignore list in Doc/conf.py.

Suggested change
:c:func:`Py_BuildValue`. In other words, if your code invokes :c:func:`!malloc`
:c:func:`Py_BuildValue`. In other words, if your code invokes :c:func:`malloc`

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw warnings on this function on this documentation page. Maybe the PR was outdated, I don't recall the details.

I didn't know nitignore, that sounds very useful!

Comment threadDoc/c-api/arg.rst
:c:func:`Py_BuildValue`. In other words, if your code invokes :c:func:`!malloc`
and passes the allocated memory to :c:func:`Py_BuildValue`, your code is
responsible for calling :c:func:`free` for that memory once
responsible for calling :c:func:`!free` for that memory once

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto. See Doc/conf.py

Suggested change
responsible for calling :c:func:`!free` for that memory once
responsible for calling :c:func:`free` for that memory once

@vstinner
vstinner marked this pull request as draft July 26, 2023 00:16
@vstinner

Copy link
Copy Markdown
MemberAuthor

I reworked this change into a serie of changes: I created issue #107298. I abandon this PR.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docsDocumentation in the Doc dirskip issueskip news

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@vstinner@erlend-aasland@bedevere-bot