Skip to content

gh-101100: Update .nitignore (after accepting library/test.rst changes) - #114770

Closed
smontanaro wants to merge 2 commits into
python:mainfrom
smontanaro:patch-7
Closed

smontanaro wants to merge 2 commits into
python:mainfrom
smontanaro:patch-7

Conversation

@smontanaro

@smontanaro smontanaro commented Jan 30, 2024 •

Copy link
Copy Markdown
Contributor

No longer required after the change to library/test.rst is accepted


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

No longer required after the change to `library/test.rst` is accepted
@hugovk

hugovk commented Feb 1, 2024

Copy link
Copy Markdown
Member

There's still warnings to fix before we can remove this entry:

Error: must not contain warnings:

Doc/library/test.rst
165: py:func reference target not found: test_main
327: c:macro reference target not found: Py_DEBUG
374: c:macro reference target not found: WITH_DOC_STRINGS
478: py:const reference target not found: _testcapi.WITH_PYMALLOC
972: py:mod reference target not found: multiprocessing.synchronize
1084: py:const reference target not found: socket.SO_REUSEADDR
1084: py:const reference target not found: socket.SO_REUSEPORT
1095: py:const reference target not found: socket.SO_EXCLUSIVEADDRUSE
1143: 'envvar' reference target not found: PYTHONUSERSITE
1554: py:func reference target not found: reload
1719: py:class reference target not found: WarningRecorder
1728: py:meth reference target not found: reset

https://github.com/python/cpython/actions/runs/7723969791/job/21055165002?pr=114770

@smontanaro

Copy link
Copy Markdown
Contributor Author

That's weird. When I ran Sphinx with the -n flag it only identified one problem in test.rst. I'll go back and check again.

@smontanaro

Copy link
Copy Markdown
Contributor Author

Error: must not contain warnings:
Doc/library/test.rst
165: py:func reference target not found: test_main
...

Question. In this case, test_main refers to a function the user supplies, not to a function supplied by the Python ecosystem. Should it even be called out as :func:`test_main` ?

smontanaro added a commit to smontanaro/cpython that referenced this pull request Feb 3, 2024
@hugovk

hugovk commented Feb 4, 2024

Copy link
Copy Markdown
Member

No, it shouldn't be linked to. It's an example function, not one we're documenting.

We have several options:

  • ``test_main`` - plain monospace formatting
  • :func:`!test_main` - add an exclamation mark to tell Sphinx to format as a method but not to try and link it

A benefit of the exclamation mark is we get similar formatting to "real" functions, but in this case I don't have a strong preference, as there's also the ``test_`` and ``test_main`` on the same line.

@smontanaro

Copy link
Copy Markdown
Contributor Author

Added the .nitignore edit to #114958.

@smontanaro smontanaro closed this Feb 12, 2024
@smontanaro
smontanaro deleted the patch-7 branch February 12, 2024 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review docs Documentation in the Doc dir skip news

3 participants