https://github.com/python/cpython/commit/efbd165392e2e44fde3cd1b554723cfb1a588708
commit: efbd165392e2e44fde3cd1b554723cfb1a588708
branch: main
author: Pengyu Lee <[email protected]>
committer: StanFromIreland <[email protected]>
date: 2026-10-25T17:43:56Z
summary:

gh-151947: Fix all Sphinx reference warnings in `email.{charset,parser}.rst` 
(#152178)

Co-authored-by: Stan Ulbrych <[email protected]>

files:
M Doc/library/email.charset.rst
M Doc/library/email.parser.rst
M Doc/tools/.nitignore
M Lib/email/charset.py

diff --git a/Doc/library/email.charset.rst b/Doc/library/email.charset.rst
index 76a57031862c85..b0a9eeb65521d0 100644
--- a/Doc/library/email.charset.rst
+++ b/Doc/library/email.charset.rst
@@ -183,8 +183,8 @@ new entries to the global character set, alias, and codec 
registries:
 
    Optional *output_charset* is the character set that the output should be in.
    Conversions will proceed from input charset, to Unicode, to the output 
charset
-   when the method :meth:`Charset.convert` is called.  The default is to 
output in
-   the same character set as the input.
+   when the method :meth:`Charset.body_encode` is called.  The default is to
+   output in the same character set as the input.
 
    Both *input_charset* and *output_charset* must have Unicode codec entries 
in the
    module's character set-to-codec mapping; use :func:`add_codec` to add 
codecs the
diff --git a/Doc/library/email.parser.rst b/Doc/library/email.parser.rst
index 6a67bf7c8e555d..0e6e4ceb64ed15 100644
--- a/Doc/library/email.parser.rst
+++ b/Doc/library/email.parser.rst
@@ -48,7 +48,7 @@ methods.
 FeedParser API
 ^^^^^^^^^^^^^^
 
-The :class:`BytesFeedParser`, imported from the :mod:`email.feedparser` module,
+The :class:`BytesFeedParser`, imported from the :mod:`!email.feedparser` 
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
@@ -86,7 +86,7 @@ Here is the API for the :class:`BytesFeedParser`:
    more information on what else *policy* controls, see the
    :mod:`~email.policy` documentation.
 
-   Note: **The policy keyword should always be specified**; The default will
+   Note: **The policy keyword should always be specified**. The default will
    change to :data:`email.policy.default` in a future version of Python.
 
    .. versionadded:: 3.2
@@ -142,7 +142,7 @@ message body, instead setting the payload to the raw body.
    arguments have the same meaning and semantics as the *_factory*
    and *policy* arguments of :class:`BytesFeedParser`.
 
-   Note: **The policy keyword should always be specified**; The default will
+   Note: **The policy keyword should always be specified**. The default will
    change to :data:`email.policy.default` in a future version of Python.
 
    .. versionchanged:: 3.3
diff --git a/Doc/tools/.nitignore b/Doc/tools/.nitignore
index 04a40030ff23f1..4e0adc58183210 100644
--- a/Doc/tools/.nitignore
+++ b/Doc/tools/.nitignore
@@ -4,8 +4,6 @@
 
 Doc/library/ast.rst
 Doc/library/asyncio-extending.rst
-Doc/library/email.charset.rst
-Doc/library/email.parser.rst
 Doc/library/logging.config.rst
 Doc/library/logging.handlers.rst
 Doc/library/multiprocessing.rst
diff --git a/Lib/email/charset.py b/Lib/email/charset.py
index 44fe0794bb73f3..84b8b4ff6376f9 100644
--- a/Lib/email/charset.py
+++ b/Lib/email/charset.py
@@ -151,7 +151,7 @@ def add_charset(charset, header_enc=None, body_enc=None, 
output_charset=None):
 
     Optional output_charset is the character set that the output should be
     in.  Conversions will proceed from input charset, to Unicode, to the
-    output charset when the method Charset.convert() is called.  The default
+    output charset when the method Charset.body_encode() is called.  The 
default
     is to output in the same character set as the input.
 
     Both input_charset and output_charset must have Unicode codec entries in

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to