@@ -48,8 +48,8 @@ methods.
48
48
FeedParser API
49
49
^^^^^^^^^^^^^^
50
50
51
- The :class: `BytesFeedParser `, imported from the :mod: `email.feedparser ` module,
52
- provides an API that is conducive to incremental parsing of email messages,
51
+ The :class: `BytesFeedParser `, imported from the :mod: `email.parser.FeedParser `
52
+ module, provides an API that is conducive to incremental parsing of email messages,
53
53
such as would be necessary when reading the text of an email message from a
54
54
source that can block (such as a socket). The :class: `BytesFeedParser ` can of
55
55
course be used to parse an email message fully contained in a :term: `bytes-like
@@ -116,7 +116,7 @@ Here is the API for the :class:`BytesFeedParser`:
116
116
Works like :class: `BytesFeedParser ` except that the input to the
117
117
:meth: `~BytesFeedParser.feed ` method must be a string. This is of limited
118
118
utility, since the only way for such a message to be valid is for it to
119
- contain only ASCII text or, if :attr: `~email.policy.Policy .utf8 ` is
119
+ contain only ASCII text or, if :attr: `~email.policy.EmailPolicy .utf8 ` is
120
120
``True ``, no binary attachments.
121
121
122
122
.. versionchanged :: 3.3 Added the *policy* keyword.
@@ -155,11 +155,11 @@ message body, instead setting the payload to the raw body.
155
155
156
156
Read all the data from the binary file-like object *fp *, parse the
157
157
resulting bytes, and return the message object. *fp * must support
158
- both the :meth: `~io.IOBase.readline ` and the :meth: `~io.IOBase .read `
158
+ both the :meth: `~io.IOBase.readline ` and the :meth: `~io.TextIOBase .read `
159
159
methods.
160
160
161
161
The bytes contained in *fp * must be formatted as a block of :rfc: `5322 `
162
- (or, if :attr: `~email.policy.Policy .utf8 ` is ``True ``, :rfc: `6532 `)
162
+ (or, if :attr: `~email.policy.EmailPolicy .utf8 ` is ``True ``, :rfc: `6532 `)
163
163
style headers and header continuation lines, optionally preceded by an
164
164
envelope header. The header block is terminated either by the end of the
165
165
data or by a blank line. Following the header block is the body of the
0 commit comments