EmailAlternative is not serializable
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
.
Change History
(8)
Cc: |
Jake Howard added
|
Owner: |
set to Florent Messa
|
Severity: |
Normal → Release blocker
|
Status: |
new → assigned
|
Triage Stage: |
Unreviewed → Accepted
|
Owner: |
changed from Florent Messa to Natalia Bidart
|
Resolution: |
→ fixed
|
Status: |
assigned → closed
|
Triage Stage: |
Accepted → Ready for checkin
|
Thank you! Refs #35537
Feel free to create a PR