Skip to content

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

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

Closed
wants to merge 2 commits into from

Conversation

smontanaro
Copy link
Contributor

@smontanaro smontanaro commented Jan 30, 2024

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
Copy link
Member

hugovk commented Feb 1, 2024

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
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
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
Copy link
Member

hugovk commented Feb 4, 2024

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
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants