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
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletionsDoc/library/email.parser.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -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
module,provides an API that is conducive to incremental parsing of email messages,
such as would be necessary when reading the text of an email message from a
source that can block (such as a socket). The :class:`BytesFeedParser` can of
course be used to parse an email message fully contained in a :term:`bytes-like
Expand DownExpand Up@@ -116,7 +116,7 @@ Here is the API for the :class:`BytesFeedParser`:
Works like :class:`BytesFeedParser` except that the input to the
:meth:`~BytesFeedParser.feed` method must be a string. This is of limited
utility, since the only way for such a message to be valid is for it to
contain only ASCII text or, if :attr:`~email.policy.Policy.utf8` is
contain only ASCII text or, if :attr:`~email.policy.EmailPolicy.utf8` is
``True``, no binary attachments.

.. versionchanged:: 3.3 Added the *policy* keyword.
Expand DownExpand Up@@ -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.

methods.

The bytes contained in *fp* must be formatted as a block of :rfc:`5322`
(or, if :attr:`~email.policy.Policy.utf8` is ``True``, :rfc:`6532`)
(or, if :attr:`~email.policy.EmailPolicy.utf8` is ``True``, :rfc:`6532`)
style headers and header continuation lines, optionally preceded by an
envelope header. The header block is terminated either by the end of the
data or by a blank line. Following the header block is the body of the
Expand Down
1 change: 0 additions & 1 deletionDoc/tools/.nitignore
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,7 +15,6 @@ Doc/extending/extending.rst
Doc/library/ast.rst
Doc/library/asyncio-extending.rst
Doc/library/email.charset.rst
Doc/library/email.parser.rst
Doc/library/functools.rst
Doc/library/http.cookiejar.rst
Doc/library/http.server.rst
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp