From 7bbd403cd25811255eaaf8e83b420d219c56574e Mon Sep 17 00:00:00 2001 From: Cheryl Sabella Date: Fri, 26 Jan 2018 17:40:16 -0500 Subject: [PATCH 1/2] bpo-15115: Document deprecation of email.encoders in Python 3 --- Doc/library/email.encoders.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Doc/library/email.encoders.rst b/Doc/library/email.encoders.rst index e24ac7b90d29f8..a0ca50a0d51319 100644 --- a/Doc/library/email.encoders.rst +++ b/Doc/library/email.encoders.rst @@ -12,6 +12,12 @@ This module is part of the legacy (``Compat32``) email API. In the new API the functionality is provided by the *cte* parameter of the :meth:`~email.message.EmailMessage.set_content` method. +This module is also deprecated in Python 3. The functions provided here +never need to be called explicitly and any calls should be removed before +porting to Python 3. The reason is that the :class:`email.mime.text.MIMEText` +class sets the content type and CTE header using the *_subtype* and *_charset* +values passed during the instaniation of that class. + The remaining text in this section is the original documentation of the module. When creating :class:`~email.message.Message` objects from scratch, you often From 7ab142764c0659f2b72274adba69b4018e3d122f Mon Sep 17 00:00:00 2001 From: Cheryl Sabella Date: Fri, 31 May 2019 15:53:35 -0400 Subject: [PATCH 2/2] Apply changes per code review --- Doc/library/email.encoders.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Doc/library/email.encoders.rst b/Doc/library/email.encoders.rst index a0ca50a0d51319..debd1c85d490a0 100644 --- a/Doc/library/email.encoders.rst +++ b/Doc/library/email.encoders.rst @@ -12,9 +12,8 @@ This module is part of the legacy (``Compat32``) email API. In the new API the functionality is provided by the *cte* parameter of the :meth:`~email.message.EmailMessage.set_content` method. -This module is also deprecated in Python 3. The functions provided here -never need to be called explicitly and any calls should be removed before -porting to Python 3. The reason is that the :class:`email.mime.text.MIMEText` +This module is deprecated in Python 3. The functions provided here +should not be called explicitly since the :class:`~email.mime.text.MIMEText` class sets the content type and CTE header using the *_subtype* and *_charset* values passed during the instaniation of that class.