FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-101100 : Fix Sphinx warnings in `library/doctest.rst` by hugovk · Pull Request #112399 · python/cpython · GitHub

Repository navigation

gh-101100 : Fix Sphinx warnings in library/doctest.rst - #112399

Merged
hugovk merged 5 commits into
python:mainfrom
hugovk:docs-fix-sphinx-warnings-doctest
Nov 25, 2023
Merged

hugovk merged 5 commits into
python:mainfrom
hugovk:docs-fix-sphinx-warnings-doctest

Conversation

hugovk commented Nov 25, 2023 •
edited by github-actions Bot
Loading

Copy link
Copy Markdown
Member

Fixes 24 Sphinx warnings:

❯ SPHINXERRORHANDLING=-n PATH=./venv/bin:$PATH sphinx-build -b html -d build/doctrees -j auto -n . build/html library/doctest.rst 2>&1 | grep doctest.rst | tee >(wc -l)
Doc/library/doctest.rst:145: WARNING: py:mod reference target not found: M
Doc/library/doctest.rst:152: WARNING: py:mod reference target not found: M
Doc/library/doctest.rst:405: WARNING: py:mod reference target not found: M
Doc/library/doctest.rst:405: WARNING: py:mod reference target not found: M
Doc/library/doctest.rst:405: WARNING: py:mod reference target not found: M
Doc/library/doctest.rst:959: WARNING: py:meth reference target not found: doctest.master.summarize
Doc/library/doctest.rst:996: WARNING: py:func reference target not found: load_tests
Doc/library/doctest.rst:1019: WARNING: py:exc reference target not found: failureException
Doc/library/doctest.rst:1085: WARNING: py:exc reference target not found: failureException
Doc/library/doctest.rst:1115: WARNING: py:class reference target not found: doctest.DocTestCase
Doc/library/doctest.rst:1115: WARNING: py:class reference target not found: DocTestCase
Doc/library/doctest.rst:1115: WARNING: py:class reference target not found: DocTestCase
Doc/library/doctest.rst:1121: WARNING: py:class reference target not found: doctest.DocFileCase
Doc/library/doctest.rst:1121: WARNING: py:class reference target not found: DocFileCase
Doc/library/doctest.rst:1121: WARNING: py:class reference target not found: DocTestCase
Doc/library/doctest.rst:1125: WARNING: py:class reference target not found: DocTestCase
Doc/library/doctest.rst:1146: WARNING: py:meth reference target not found: runTest
Doc/library/doctest.rst:1146: WARNING: py:class reference target not found: DocTestCase
Doc/library/doctest.rst:1146: WARNING: py:class reference target not found: DocTestCase
Doc/library/doctest.rst:1146: WARNING: py:class reference target not found: DocTestCase
Doc/library/doctest.rst:1321: WARNING: py:attr reference target not found: optionflags
Doc/library/doctest.rst:1561: WARNING: py:meth reference target not found: DocTestRunner.report_*
Doc/library/doctest.rst:1733: WARNING: py:func reference target not found: f
Doc/library/doctest.rst:1743: WARNING: py:func reference target not found: f
      24

M and f are example code, skip 'em.

These docs explicitly say "DocTestCase isn’t documented here (it’s an internal detail)" so skip it and its method too, and also the similar DocFileCase.

Add docs for the failureException exception.


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

AlexWaygood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks!

Comment thread Doc/library/doctest.rst Outdated
Comment thread Doc/library/doctest.rst Outdated
Comment thread Doc/library/doctest.rst Outdated
Comment thread Doc/library/doctest.rst Outdated
Comment thread Doc/library/doctest.rst Outdated
Comment thread Doc/library/doctest.rst Outdated

AlexWaygood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM, thanks!

Comment thread Doc/library/doctest.rst Outdated
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
hugovk merged commit 0303a9f into python:main Nov 25, 2023
hugovk deleted the docs-fix-sphinx-warnings-doctest branch November 25, 2023 18:08

Copy link
Copy Markdown

Thanks @hugovk for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

Copy link
Copy Markdown

Sorry, @hugovk, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 0303a9fa79ab51def97346ae0b9e535de1e33503 3.11

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 25, 2023
…nGH-112399)

* Fix Sphinx warnings in library/doctest.rst

* Don't link to self, and wrap a line

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

* Link to load_tests protocol

* Link to option flags

* Wrap line

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

---------

(cherry picked from commit 0303a9f)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

bedevere-app Bot commented Nov 25, 2023

Copy link
Copy Markdown

GH-112402 is a backport of this pull request to the 3.12 branch.

hugovk commented Nov 25, 2023

Copy link
Copy Markdown
Member Author

Thanks for the review!

bedevere-app Bot removed the needs backport to 3.12 only security fixes label Nov 25, 2023

bedevere-app Bot commented Nov 25, 2023

Copy link
Copy Markdown

GH-112404 is a backport of this pull request to the 3.11 branch.

bedevere-app Bot removed the needs backport to 3.11 only security fixes label Nov 25, 2023
hugovk added a commit to hugovk/cpython that referenced this pull request Nov 25, 2023
…pythonGH-112399)

* Fix Sphinx warnings in library/doctest.rst

* Don't link to self, and wrap a line

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

* Link to load_tests protocol

* Link to option flags

* Wrap line

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

---------

(cherry picked from commit 0303a9f)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
hugovk added a commit that referenced this pull request Nov 25, 2023
…12399) (#112402)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
hugovk added a commit that referenced this pull request Nov 25, 2023
…12399) (#112404)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
…n#112399)

* Fix Sphinx warnings in library/doctest.rst

* Don't link to self, and wrap a line

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

* Link to load_tests protocol

* Link to option flags

* Wrap line

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

---------

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
…n#112399)

* Fix Sphinx warnings in library/doctest.rst

* Don't link to self, and wrap a line

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

* Link to load_tests protocol

* Link to option flags

* Wrap line

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

---------

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip news

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL