Skip to content

Conversation

@hugovk
Copy link
Member

@hugovkhugovk commented Nov 25, 2023

Fix 7 Sphinx warnings, in most files with a single warning:

Doc/c-api/set.rst:148: WARNING: py:meth reference target not found: set.discard Doc/extending/newtypes.rst:295: WARNING: py:attr reference target not found: __doc__ Doc/library/asyncio-stream.rst:263: WARNING: py:meth reference target not found: feed_eof Doc/library/email.headerregistry.rst:61: WARNING: py:exc reference target not found: email.errors.HeaderDefect Doc/library/gzip.rst:108: WARNING: py:meth reference target not found: close Doc/library/importlib.resources.rst:59: WARNING: py:class reference target not found: Anchor Doc/library/xml.rst:73: WARNING: py:const reference target not found: pyexpat.EXPAT_VERSION 

Plus a bit of extra cleanup, details in commits.


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

Copy link
Contributor

@willingcwillingc left a comment

Choose a reason for hiding this comment

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

Thanks @hugovk.

@miss-islington-app
Copy link

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

@miss-islington-app
Copy link

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

cherry_picker 3faf8e586d36e73faba13d9b61663afed6a24cb4 3.12 

@miss-islington-app
Copy link

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

cherry_picker 3faf8e586d36e73faba13d9b61663afed6a24cb4 3.11 

Return ``1`` if found and removed, ``0`` if not found (no action taken), and ``-1`` if an
error is encountered. Does not raise :exc:`KeyError` for missing keys. Raise a
:exc:`TypeError` if the *key* is unhashable. Unlike the Python :meth:`~set.discard`
:exc:`TypeError` if the *key* is unhashable. Unlike the Python :meth:`~frozenset.discard`
Copy link
Member

Choose a reason for hiding this comment

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

Ideally we'd fix it so that the original linked properly, given that frozensets don't have a .discard() method, but sets do 🙃

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Good idea, although I'm not sure how to do it. PR welcome! 🙃

@willingc
Copy link
Contributor

willingc commented Nov 26, 2023

@hugovk or @AlexWaygood Would you mind doing the backports? I'm getting ready for a flight to Japan so will be offline for a while. Thanks!

@hugovkhugovk deleted the docs-fix-sphinx-warnings branch November 26, 2023 08:13
@hugovk
Copy link
MemberAuthor

Yes, I'll take care of the backports. Enjoy your trip!

hugovk added a commit to hugovk/cpython that referenced this pull request Nov 26, 2023
* Fix Sphinx warning in library/xml.rst Direct use of the pyexpat module is deprecated, but this is how to check the version for security purposes * Fix Sphinx warning in library/importlib.resources.rst * Use italics for parameters * Link to the exception * Fix Sphinx warning in library/gzip.rst * Document message and header defect base classes to fix Sphinx warning in library/email.headerregistry.rst * Restore feed_eof() doc to fix Sphinx warning in library/asyncio-stream.rst * Fix Sphinx warning in extending/newtypes.rst * Fix Sphinx warning in c-api/set.rst On stdtypes.rst, set and frozenset are documented together and the frozenset has the working refs (cherry picked from commit 3faf8e5) Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
hugovk added a commit to hugovk/cpython that referenced this pull request Nov 26, 2023
* Fix Sphinx warning in library/xml.rst Direct use of the pyexpat module is deprecated, but this is how to check the version for security purposes * Fix Sphinx warning in library/importlib.resources.rst * Use italics for parameters * Link to the exception * Fix Sphinx warning in library/gzip.rst * Document message and header defect base classes to fix Sphinx warning in library/email.headerregistry.rst * Restore feed_eof() doc to fix Sphinx warning in library/asyncio-stream.rst * Fix Sphinx warning in extending/newtypes.rst * Fix Sphinx warning in c-api/set.rst On stdtypes.rst, set and frozenset are documented together and the frozenset has the working refs (cherry picked from commit 3faf8e5) Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
@bedevere-app
Copy link

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

@bedevere-appbedevere-appbot removed the needs backport to 3.12 only security fixes label Nov 26, 2023
@bedevere-app
Copy link

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

@bedevere-appbedevere-appbot removed the needs backport to 3.11 only security fixes label Nov 26, 2023
hugovk added a commit to hugovk/cpython that referenced this pull request Nov 26, 2023
* Fix Sphinx warning in library/xml.rst Direct use of the pyexpat module is deprecated, but this is how to check the version for security purposes * Fix Sphinx warning in library/importlib.resources.rst * Use italics for parameters * Link to the exception * Fix Sphinx warning in library/gzip.rst * Document message and header defect base classes to fix Sphinx warning in library/email.headerregistry.rst * Restore feed_eof() doc to fix Sphinx warning in library/asyncio-stream.rst * Fix Sphinx warning in extending/newtypes.rst * Fix Sphinx warning in c-api/set.rst On stdtypes.rst, set and frozenset are documented together and the frozenset has the working refs (cherry picked from commit 3faf8e5) Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
hugovk added a commit that referenced this pull request Nov 26, 2023
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
* Fix Sphinx warning in library/xml.rst Direct use of the pyexpat module is deprecated, but this is how to check the version for security purposes * Fix Sphinx warning in library/importlib.resources.rst * Use italics for parameters * Link to the exception * Fix Sphinx warning in library/gzip.rst * Document message and header defect base classes to fix Sphinx warning in library/email.headerregistry.rst * Restore feed_eof() doc to fix Sphinx warning in library/asyncio-stream.rst * Fix Sphinx warning in extending/newtypes.rst * Fix Sphinx warning in c-api/set.rst On stdtypes.rst, set and frozenset are documented together and the frozenset has the working refs
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
* Fix Sphinx warning in library/xml.rst Direct use of the pyexpat module is deprecated, but this is how to check the version for security purposes * Fix Sphinx warning in library/importlib.resources.rst * Use italics for parameters * Link to the exception * Fix Sphinx warning in library/gzip.rst * Document message and header defect base classes to fix Sphinx warning in library/email.headerregistry.rst * Restore feed_eof() doc to fix Sphinx warning in library/asyncio-stream.rst * Fix Sphinx warning in extending/newtypes.rst * Fix Sphinx warning in c-api/set.rst On stdtypes.rst, set and frozenset are documented together and the frozenset has the working refs
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docsDocumentation in the Doc dirskip news

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@hugovk@willingc@AlexWaygood