Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-101100: Fix sphinx warnings inlibrary/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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

LamentXU123
Copy link
Contributor

@LamentXU123LamentXU123 commentedJul 9, 2025
edited by github-actionsbot
Loading

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/

@bedevere-appbedevere-appbot added awaiting review docsDocumentation in the Doc dir skip news labelsJul 9, 2025
@hugovkhugovk added needs backport to 3.13bugs and security fixes needs backport to 3.14bugs and security fixes labelsJul 11, 2025
@hugovkhugovk merged commit515b3d1 intopython:mainJul 11, 2025
36 checks passed
@github-project-automationgithub-project-automationbot moved this fromTodo toDone inDocs PRsJul 11, 2025
@hugovk
Copy link
Member

Thanks.

LamentXU123 reacted with heart emoji

@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 requestJul 11, 2025
…ythonGH-136475)(cherry picked from commit515b3d1)Co-authored-by: Weilin Du <108666168+LamentXU123@users.noreply.github.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestJul 11, 2025
…ythonGH-136475)(cherry picked from commit515b3d1)Co-authored-by: Weilin Du <108666168+LamentXU123@users.noreply.github.com>
@bedevere-app
Copy link

GH-136532 is a backport of this pull request to the3.14 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.14bugs and security fixes labelJul 11, 2025
@bedevere-app
Copy link

GH-136533 is a backport of this pull request to the3.13 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.13bugs and security fixes labelJul 11, 2025
hugovk pushed a commit that referenced this pull requestJul 11, 2025
…H-136475) (#136532)Co-authored-by: Weilin Du <108666168+LamentXU123@users.noreply.github.com>
hugovk pushed a commit that referenced this pull requestJul 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 requestJul 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`

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
ContributorAuthor

@LamentXU123LamentXU123Jul 11, 2025
edited
Loading

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
ContributorAuthor

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.

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 forio.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.

picnixz reacted with thumbs up emoji
Copy link
Member

Choose a reason for hiding this comment

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

IOBase doesn't declareread on purpose because:

Even though IOBase does not declare read, readinto, or write because
their signatures will vary, implementations and clients should
consider those methods part of the interface.

Currently, inio.rst, we also suppress theread method for IOBase. So, we should considerread as a "protocol" that follows "some" signature whose defaults have "some" meanings (again it depends on the object itself).

I suggest that we revert this entirely and keep the warning to know in the future which read() protocol it should follow.

serhiy-storchaka and LamentXU123 reacted with thumbs up emoji
Copy link
Member

Choose a reason for hiding this comment

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

Please see PR#136629 to revert.

@@ -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`

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 isemail.feedparser.email.parser.FeedParser is not a module.

Copy link
ContributorAuthor

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
ContributorAuthor

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 foremail.feedparser. We can add it later. Now I suggest to subpress the link.

Copy link
Member

Choose a reason for hiding this comment

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

I suggest we don't suppress links but keep the warnings so to know which objects need to be documented. Suppressing the links is not a good idea here.

serhiy-storchaka and LamentXU123 reacted with thumbs up emoji
@LamentXU123
Copy link
ContributorAuthor

LamentXU123 commentedJul 11, 2025
edited
Loading

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.

Pranjal095 pushed a commit to Pranjal095/cpython that referenced this pull requestJul 12, 2025
picnixz pushed a commit to picnixz/cpython that referenced this pull requestJul 13, 2025
hugovk added a commit to hugovk/cpython that referenced this pull requestJul 13, 2025
miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestJul 14, 2025
…ail.parser.rst` (pythonGH-136475)" (pythonGH-136629)(cherry picked from commit5bbf30e)Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestJul 14, 2025
…ail.parser.rst` (pythonGH-136475)" (pythonGH-136629)(cherry picked from commit5bbf30e)Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
hugovk added a commit that referenced this pull requestJul 14, 2025
…mail.parser.rst` (GH-136475)" (GH-136629) (#136646)Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
hugovk added a commit that referenced this pull requestJul 14, 2025
…mail.parser.rst` (GH-136475)" (GH-136629) (#136647)Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@serhiy-storchakaserhiy-storchakaserhiy-storchaka left review comments

@picnixzpicnixzpicnixz left review comments

@AA-TurnerAA-TurnerAwaiting requested review from AA-TurnerAA-Turner is a code owner

@hugovkhugovkAwaiting requested review from hugovkhugovk is a code owner

Assignees
No one assigned
Labels
docsDocumentation in the Doc dirskip news
Projects
Status: Done
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@LamentXU123@hugovk@serhiy-storchaka@picnixz

[8]ページ先頭

©2009-2025 Movatter.jp