#35581: Upgrade django.core.mail to use Python's modern email API
-------------------------------------+-------------------------------------
     Reporter:  Mike Edmunds         |                    Owner:  Mike
         Type:                       |  Edmunds
  Cleanup/optimization               |                   Status:  assigned
    Component:  Core (Mail)          |                  Version:  dev
     Severity:  Normal               |               Resolution:
     Keywords:  email, compat32      |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Comment (by Mike Edmunds):

 The PR includes a few changes that weren't covered by the original
 [https://groups.google.com/g/django-developers/c/2zf9GQtjdIk deprecation
 plan] from the django-developers discussion:

 1. **Deprecated MIMEBase attachments:** I had [https://groups.google.com/g
 /django-developers/c/2zf9GQtjdIk/m/LcBfqfizAAAJ originally proposed]
 continuing support for legacy MIMEBase attachments without deprecation.
 But it turns out the modern API's email.message.MIMEPart is a good
 replacement, so the PR puts MIMEBase on the usual deprecation path. I've
 also added a docs example of using MIMEPart for inline images.

 2. **Dropped undocumented subtype attributes:** Removed support for the
 undocumented `EmailMessage.mixed_subtype` and
 `EmailMultiAlternatives.alternative_subtype` attributes. (But it will
 raise an error on attempts to use them.)

 3. **Dropped undocumented encoding=Charset():** The legacy code allows
 setting the undocumented `EmailMessage.encoding` property to a legacy
 email.charset.Charset object. There's no way to make that work with the
 modern APIs, so I've dropped it. (You can still set encoding to a string
 charset name, and that works properly.)
-- 
Ticket URL: <https://code.djangoproject.com/ticket/35581#comment:19>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/01070193f61eda1c-da5c7e1b-aad2-4413-9448-271ebff0f4b6-000000%40eu-central-1.amazonses.com.

Reply via email to