#36309: EmailAlternative is not serializable
-------------------------------+---------------------------------------
     Reporter:  Florent Messa  |                     Type:  Bug
       Status:  new            |                Component:  Core (Mail)
      Version:  5.2            |                 Severity:  Normal
     Keywords:                 |             Triage Stage:  Unreviewed
    Has patch:  0              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  0              |                    UI/UX:  0
-------------------------------+---------------------------------------
 Since 5.2, the type `EmailAlternative` has been introduced but it doesn't
 seem to be serializable due to its typename.


 {{{
 In [1]: from django.core.mail.message import EmailAlternative

 In [2]: import pickle

 In [3]: pickle.loads(pickle.dumps(EmailAlternative('test', 'test')))
 ---------------------------------------------------------------------------
 PicklingError                             Traceback (most recent call
 last)
 Cell In[3], line 1
 ----> 1 pickle.loads(pickle.dumps(EmailAlternative('test', 'test')))

 PicklingError: Can't pickle <class
 'django.core.mail.message.Alternative'>: attribute lookup Alternative on
 django.core.mail.message failed
 }}}

 I have already the patch, the typename should be updated for both
 `EmailAlternative` and `EmailAttachment`.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36309>
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/0107019616d8e656-3c167f76-15e8-417d-9897-4c4500f508fe-000000%40eu-central-1.amazonses.com.

Reply via email to