https://github.com/python/cpython/commit/b536e371044f9e9b1b34cc8276a01e67550b5428
commit: b536e371044f9e9b1b34cc8276a01e67550b5428
branch: main
author: Yuki Kobayashi <drsuaimqj...@gmail.com>
committer: encukou <encu...@gmail.com>
date: 2025-02-26T08:34:10Z
summary:

gh-130433: Update documentation for `MultipartConversionError` (GH-130436)

files:
M Doc/library/email.errors.rst

diff --git a/Doc/library/email.errors.rst b/Doc/library/email.errors.rst
index f8f43d82a3df2e..61142d58ca8280 100644
--- a/Doc/library/email.errors.rst
+++ b/Doc/library/email.errors.rst
@@ -45,18 +45,12 @@ The following exception classes are defined in the 
:mod:`email.errors` module:
 
 .. exception:: MultipartConversionError()
 
-   Raised when a payload is added to a :class:`~email.message.Message` object
-   using :meth:`add_payload`, but the payload is already a scalar and the
-   message's :mailheader:`Content-Type` main type is not either
-   :mimetype:`multipart` or missing.  :exc:`MultipartConversionError` multiply
-   inherits from :exc:`MessageError` and the built-in :exc:`TypeError`.
-
-   Since :meth:`Message.add_payload` is deprecated, this exception is rarely
-   raised in practice.  However the exception may also be raised if the
-   :meth:`~email.message.Message.attach`
-   method is called on an instance of a class derived from
+   Raised if the :meth:`~email.message.Message.attach` method is called
+   on an instance of a class derived from
    :class:`~email.mime.nonmultipart.MIMENonMultipart` (e.g.
    :class:`~email.mime.image.MIMEImage`).
+   :exc:`MultipartConversionError` multiply
+   inherits from :exc:`MessageError` and the built-in :exc:`TypeError`.
 
 
 .. exception:: HeaderWriteError()

_______________________________________________
Python-checkins mailing list -- python-checkins@python.org
To unsubscribe send an email to python-checkins-le...@python.org
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: arch...@mail-archive.com

Reply via email to