diff --git a/Doc/c-api/datetime.rst b/Doc/c-api/datetime.rst index d7b4e116c49e35..1cae742593f117 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. @@ -51,7 +51,7 @@ macros. .. versionchanged:: 3.15 This variable should not be accessed directly as direct access is not thread-safe. - Use :c:func:`PyDateTime_IMPORT` instead. + Use :c:macro:`PyDateTime_IMPORT` instead. .. c:type:: PyDateTime_Date diff --git a/Doc/c-api/function.rst b/Doc/c-api/function.rst index a0ccde984effb1..fcc3eb87bbee79 100644 --- a/Doc/c-api/function.rst +++ b/Doc/c-api/function.rst @@ -193,7 +193,7 @@ There are a few functions specific to Python functions. .. versionadded:: 3.12 - - ``PyFunction_PYFUNC_EVENT_MODIFY_QUALNAME`` + - ``PyFunction_EVENT_MODIFY_QUALNAME`` .. versionadded:: 3.15 diff --git a/Doc/howto/mro.rst b/Doc/howto/mro.rst index 5007fa046b9c79..de597962b41ea0 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 6f4f813a0f84d8..f947808c2c5c6b 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 b70df130e06dfa..4d9662389e2679 100644 --- a/Doc/library/email.message.rst +++ b/Doc/library/email.message.rst @@ -633,7 +633,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 82a2b305f8daed..28067a4eb9d3a2 100644 --- a/Doc/library/email.policy.rst +++ b/Doc/library/email.policy.rst @@ -535,7 +535,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 0399b55721c834..bb60546c8aec57 100644 --- a/Doc/library/mailbox.rst +++ b/Doc/library/mailbox.rst @@ -500,7 +500,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 6400005871746a..02ef8381cce8f9 100644 --- a/Doc/library/select.rst +++ b/Doc/library/select.rst @@ -571,7 +571,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 390b82d5a1fdc1..a0a6a17cdbbb08 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 4adb5cbd1b7d3b..94d958cfcb7c37 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 d09d2f5238d40b..1f9cd8c378f3d3 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 diff --git a/Misc/NEWS.d/3.15.0a1.rst b/Misc/NEWS.d/3.15.0a1.rst index d5a5d30dfa32ae..d71401e0347260 100644 --- a/Misc/NEWS.d/3.15.0a1.rst +++ b/Misc/NEWS.d/3.15.0a1.rst @@ -5914,8 +5914,8 @@ Exception text when trying to delete attributes of types was clarified. .. nonce: ALByCb .. section: C API -Function watchers can now receive a PyFunction_PYFUNC_EVENT_MODIFY_QUALNAME -event when a watched functions qualname is changed. +Function watchers can now receive a PyFunction_EVENT_MODIFY_QUALNAME +event when a watched function's qualname is changed. ..