https://github.com/python/cpython/commit/5364b2d0d8074018a646e1f3aced12c7d1ea9091
commit: 5364b2d0d8074018a646e1f3aced12c7d1ea9091
branch: 3.14
author: Inada Naoki <[email protected]>
committer: methane <[email protected]>
date: 2026-10-28T03:12:32Z
summary:
Doc: Fix typos in documentation and docstring (GH-160743)
(cherry picked from commit dbf9776413874d7d53931a9e1e928ce254881d22)
files:
M Doc/c-api/datetime.rst
M Doc/howto/mro.rst
M Doc/library/email.generator.rst
M Doc/library/email.message.rst
M Doc/library/email.policy.rst
M Doc/library/mailbox.rst
M Doc/library/select.rst
M Doc/whatsnew/3.10.rst
M Doc/whatsnew/3.11.rst
M Lib/email/policy.py
diff --git a/Doc/c-api/datetime.rst b/Doc/c-api/datetime.rst
index 127d7c9c91a3d5f..10c0ce0366a86fc 100644
--- a/Doc/c-api/datetime.rst
+++ b/Doc/c-api/datetime.rst
@@ -13,7 +13,7 @@ the module initialisation function. The macro puts a pointer
to a C structure
into a static variable, :c:data:`PyDateTimeAPI`, that is used by the following
macros.
-.. c:macro:: PyDateTime_IMPORT()
+.. c:macro:: PyDateTime_IMPORT
Import the datetime C API.
diff --git a/Doc/howto/mro.rst b/Doc/howto/mro.rst
index 5007fa046b9c792..de597962b41ea0a 100644
--- a/Doc/howto/mro.rst
+++ b/Doc/howto/mro.rst
@@ -348,7 +348,7 @@ straightforward to compute the linearizations of O, X, Y, A
and B:
.. code-block:: text
- L[O] = 0
+ L[O] = O
L[X] = X O
L[Y] = Y O
L[A] = A X Y O
diff --git a/Doc/library/email.generator.rst b/Doc/library/email.generator.rst
index 6f4f813a0f84d8c..f947808c2c5c6b8 100644
--- a/Doc/library/email.generator.rst
+++ b/Doc/library/email.generator.rst
@@ -61,7 +61,7 @@ To accommodate reproducible processing of SMIME-signed
messages
If *maxheaderlen* is not ``None``, refold any header lines that are longer
than *maxheaderlen*, or if ``0``, do not rewrap any headers. If
- *manheaderlen* is ``None`` (the default), wrap headers and other message
+ *maxheaderlen* is ``None`` (the default), wrap headers and other message
lines according to the *policy* settings.
If *policy* is specified, use that policy to control message generation. If
@@ -137,7 +137,7 @@ a serialized binary representation of a message object.
For more detail, see
Because strings cannot represent binary data, the :class:`Generator` class must
convert any binary data in any message it flattens to an ASCII compatible
format, by converting them to an ASCII compatible
-:mailheader:`Content-Transfer_Encoding`. Using the terminology of the email
+:mailheader:`Content-Transfer-Encoding`. Using the terminology of the email
RFCs, you can think of this as :class:`Generator` serializing to an I/O stream
that is not "8 bit clean". In other words, most applications will want
to be using :class:`BytesGenerator`, and not :class:`Generator`.
@@ -162,7 +162,7 @@ to be using :class:`BytesGenerator`, and not
:class:`Generator`.
If *maxheaderlen* is not ``None``, refold any header lines that are longer
than *maxheaderlen*, or if ``0``, do not rewrap any headers. If
- *manheaderlen* is ``None`` (the default), wrap headers and other message
+ *maxheaderlen* is ``None`` (the default), wrap headers and other message
lines according to the *policy* settings.
If *policy* is specified, use that policy to control message generation. If
@@ -267,7 +267,7 @@ in with information about the part.
"[Non-text (%(type)s) part of message omitted, filename %(filename)s]"
- Optional *_mangle_from_* and *maxheaderlen* are as with the
+ Optional *mangle_from_* and *maxheaderlen* are as with the
:class:`Generator` base class.
diff --git a/Doc/library/email.message.rst b/Doc/library/email.message.rst
index f6908d2e6e9748e..8de2f2b3d3bedea 100644
--- a/Doc/library/email.message.rst
+++ b/Doc/library/email.message.rst
@@ -636,7 +636,7 @@ message objects.
.. method:: make_mixed(boundary=None)
Convert a non-``multipart``, a ``multipart/related``, or a
- ``multipart-alternative`` into a ``multipart/mixed``, moving any existing
+ ``multipart/alternative`` into a ``multipart/mixed``, moving any existing
:mailheader:`Content-` headers and payload into a (new) first part of the
``multipart``. If *boundary* is specified, use it as the boundary string
in the multipart, otherwise leave the boundary to be automatically
diff --git a/Doc/library/email.policy.rst b/Doc/library/email.policy.rst
index 64074d8cbc7d50f..15190943913c0b9 100644
--- a/Doc/library/email.policy.rst
+++ b/Doc/library/email.policy.rst
@@ -523,7 +523,7 @@ added matters. To illustrate::
If :attr:`~Policy.cte_type` is ``8bit``, non-ASCII binary data is
converted back
into bytes. Headers with binary data are not refolded, regardless of the
- ``refold_header`` setting, since there is no way to know whether the
+ ``refold_source`` setting, since there is no way to know whether the
binary data consists of single byte characters or multibyte characters.
diff --git a/Doc/library/mailbox.rst b/Doc/library/mailbox.rst
index 4ec5d3831289852..8cba283601a7df7 100644
--- a/Doc/library/mailbox.rst
+++ b/Doc/library/mailbox.rst
@@ -495,7 +495,7 @@ Supported mailbox formats are Maildir, mbox, MH, Babyl, and
MMDF.
.. method:: set_info(key, info)
Set the info of the message corresponding to *key* to *info*.
- Calling ``some_mailbox.set_info(key, flags)`` is similar to ::
+ Calling ``some_mailbox.set_info(key, info)`` is similar to ::
one_message = some_mailbox.get_message(key)
one_message.set_info(info)
diff --git a/Doc/library/select.rst b/Doc/library/select.rst
index 3c72c2d59150c99..6e6154d98243cb7 100644
--- a/Doc/library/select.rst
+++ b/Doc/library/select.rst
@@ -547,7 +547,7 @@ https://man.freebsd.org/cgi/man.cgi?query=kqueue&sektion=2
| :const:`KQ_FILTER_AIO` | AIO requests. |
+---------------------------+---------------------------------------------+
| :const:`KQ_FILTER_VNODE` | Returns when one or more of the requested |
- | | events watched in *fflag* occurs. |
+ | | events watched in *fflags* occurs. |
+---------------------------+---------------------------------------------+
| :const:`KQ_FILTER_PROC` | Watch for events on a process ID. |
+---------------------------+---------------------------------------------+
diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst
index 0e3ffb064613856..141b19fd2621325 100644
--- a/Doc/whatsnew/3.10.rst
+++ b/Doc/whatsnew/3.10.rst
@@ -1648,7 +1648,7 @@ Deprecated
:meth:`~importlib.abc.Loader.exec_module` instead.
(Contributed by Brett Cannon in :issue:`26131`.)
-* :meth:`!zimport.zipimporter.load_module` has been deprecated in
+* :meth:`!zipimport.zipimporter.load_module` has been deprecated in
preference for :meth:`~zipimport.zipimporter.exec_module`.
(Contributed by Brett Cannon in :issue:`26131`.)
@@ -1711,8 +1711,8 @@ Deprecated
(Contributed by Brett Cannon in :issue:`42137`.)
* :meth:`!importlib.abc.Loader.module_repr`,
- :meth:`!importlib.machinery.FrozenLoader.module_repr`, and
- :meth:`!importlib.machinery.BuiltinLoader.module_repr` are deprecated and
+ :meth:`!importlib.machinery.FrozenImporter.module_repr`, and
+ :meth:`!importlib.machinery.BuiltinImporter.module_repr` are deprecated and
slated for removal in Python 3.12.
(Contributed by Brett Cannon in :issue:`42136`.)
@@ -1742,7 +1742,7 @@ Deprecated
* ``threading.Thread.setName`` => :attr:`threading.Thread.name`
- * ``threading.thread.getName`` => :attr:`threading.Thread.name`
+ * ``threading.Thread.getName`` => :attr:`threading.Thread.name`
* ``threading.Thread.isDaemon`` => :attr:`threading.Thread.daemon`
diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst
index 545b2690b40ce06..fe9385d1d66aef5 100644
--- a/Doc/whatsnew/3.11.rst
+++ b/Doc/whatsnew/3.11.rst
@@ -1904,11 +1904,11 @@ C APIs pending removal are
* :meth:`!importlib.abc.PathEntryFinder.find_loader`
* :meth:`!importlib.abc.PathEntryFinder.find_module`
* :meth:`!importlib.machinery.BuiltinImporter.find_module`
-* :meth:`!importlib.machinery.BuiltinLoader.module_repr`
+* :meth:`!importlib.machinery.BuiltinImporter.module_repr`
* :meth:`!importlib.machinery.FileFinder.find_loader`
* :meth:`!importlib.machinery.FileFinder.find_module`
* :meth:`!importlib.machinery.FrozenImporter.find_module`
-* :meth:`!importlib.machinery.FrozenLoader.module_repr`
+* :meth:`!importlib.machinery.FrozenImporter.module_repr`
* :meth:`!importlib.machinery.PathFinder.find_module`
* :meth:`!importlib.machinery.WindowsRegistryFinder.find_module`
* :func:`!importlib.util.module_for_loader`
diff --git a/Lib/email/policy.py b/Lib/email/policy.py
index d09d2f5238d40b2..1f9cd8c378f3d37 100644
--- a/Lib/email/policy.py
+++ b/Lib/email/policy.py
@@ -197,7 +197,7 @@ def fold_binary(self, name, value):
If cte_type is 8bit, non-ASCII binary data is converted back into
bytes. Headers with binary data are not refolded, regardless of the
- refold_header setting, since there is no way to know whether the binary
+ refold_source setting, since there is no way to know whether the binary
data consists of single byte characters or multibyte characters.
If utf8 is true, headers are encoded to utf8, otherwise to ascii with
_______________________________________________
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]