Skip to content

gh-101100: Fix sphinx warnings in library/email.parser.rst #136475

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

Merged
merged 2 commits into from
Jul 11, 2025

Conversation

LamentXU123
Copy link
Contributor

@LamentXU123 LamentXU123 commented Jul 9, 2025

before:

C:\Users\admin\Downloads\cpython-main\Doc\library\email.parser.rst:51: WARNING: py:mod reference target not found: email.feedparser [ref.mod]
C:\Users\admin\Downloads\cpython-main\Doc\library\email.parser.rst:116: WARNING: py:attr reference target not found: email.policy.Policy.utf8 [ref.attr]
C:\Users\admin\Downloads\cpython-main\Doc\library\email.parser.rst:156: WARNING: py:meth reference target not found: io.IOBase.read [ref.meth]
C:\Users\admin\Downloads\cpython-main\Doc\library\email.parser.rst:161: WARNING: py:attr reference target not found: email.policy.Policy.utf8 [ref.attr]

This PR fix them all. The changes:


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

@LamentXU123 LamentXU123 requested review from a team, AA-Turner and hugovk as code owners July 9, 2025 16:11
@bedevere-app bedevere-app bot added awaiting review docs Documentation in the Doc dir skip news labels Jul 9, 2025
@github-project-automation github-project-automation bot moved this to Todo in Docs PRs Jul 9, 2025
@hugovk hugovk added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Jul 11, 2025
@hugovk hugovk merged commit 515b3d1 into python:main Jul 11, 2025
36 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in Docs PRs Jul 11, 2025
@hugovk
Copy link
Member

hugovk commented Jul 11, 2025

Thanks.

@miss-islington-app
Copy link

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 11, 2025
…ythonGH-136475)

(cherry picked from commit 515b3d1)

Co-authored-by: Weilin Du <108666168+LamentXU123@users.noreply.github.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 11, 2025
…ythonGH-136475)

(cherry picked from commit 515b3d1)

Co-authored-by: Weilin Du <108666168+LamentXU123@users.noreply.github.com>
@bedevere-app
Copy link

bedevere-app bot commented Jul 11, 2025

GH-136532 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label Jul 11, 2025
@bedevere-app
Copy link

bedevere-app bot commented Jul 11, 2025

GH-136533 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Jul 11, 2025
hugovk pushed a commit that referenced this pull request Jul 11, 2025
…H-136475) (#136532)

Co-authored-by: Weilin Du <108666168+LamentXU123@users.noreply.github.com>
hugovk pushed a commit that referenced this pull request Jul 11, 2025
…H-136475) (#136533)

Co-authored-by: Weilin Du <108666168+LamentXU123@users.noreply.github.com>
AndPuQing pushed a commit to AndPuQing/cpython that referenced this pull request Jul 11, 2025
@@ -155,11 +155,11 @@ message body, instead setting the payload to the raw body.

Read all the data from the binary file-like object *fp*, parse the
resulting bytes, and return the message object. *fp* must support
both the :meth:`~io.IOBase.readline` and the :meth:`~io.IOBase.read`
both the :meth:`~io.IOBase.readline` and the :meth:`~io.TextIOBase.read`
Copy link
Member

Choose a reason for hiding this comment

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

This is a binary file-like object. io.TextIOBase.read is incorrect reference.

Copy link
Contributor Author

@LamentXU123 LamentXU123 Jul 11, 2025

Choose a reason for hiding this comment

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

Yes I'm not quite sure about this change. There is indeed no doc to ~io.IOBase.read, I suggest to add one here maybe in the future issues(?)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Now, lets subpress this link. It is incorrect.

Copy link
Member

Choose a reason for hiding this comment

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

It is better to add the documentation or the anchor for io.IOBase.read, but this is a separate issue. We will need to find also all silenced references to it.

For now, just restore the old code. Without silencing unresolved references.

@@ -48,8 +48,8 @@ methods.
FeedParser API
^^^^^^^^^^^^^^

The :class:`BytesFeedParser`, imported from the :mod:`email.feedparser` module,
provides an API that is conducive to incremental parsing of email messages,
The :class:`BytesFeedParser`, imported from the :mod:`email.parser.FeedParser`
Copy link
Member

Choose a reason for hiding this comment

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

The name of the module is email.feedparser. email.parser.FeedParser is not a module.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oups, sry for this overlook

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same for this. It seems like we don't get a doc for email.feedparser. We can add it later. Now I suggest to subpress the link.

@LamentXU123
Copy link
Contributor Author

LamentXU123 commented Jul 11, 2025

Hi @hugovk, the two changes are indeed incorrect. Please revert it. Sry for the overlook.

Just subpress the two links mentioned before is OK. sry again.

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
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy