So, might there be a bug in 1.11, or should I not be using the ".encode"?
(Was using that because of weird user input)
And furthermore, why does pre-1.11 not throw an exception?
I thank you for you attention.
--
Ticket URL: <https://code.djangoproject.com/ticket/28196>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* component: Uncategorized => Core (Mail)
Comment:
To help answer your question, you could
[https://docs.djangoproject.com/en/dev/internals/contributing/triaging-
tickets/#bisecting-a-regression bisect] to find the commit where the
behavior changed.
Generally, you should use our
[wiki:TicketClosingReasons/UseSupportChannels support channels] to ask "is
it a bug?" questions rather than seeking help through the ticket tracker.
--
Ticket URL: <https://code.djangoproject.com/ticket/28196#comment:1>
Comment (by Claude Paroz):
There's absolutely no reason to encode the content passed to
`EmailMessage`, so even if it was not failing before, I would be against
restoring the previous behavior.
Nonetheless the EmailMessage `__init__` docstring talks about accepting
UTF-8 bytestrings, which should be removed IMO.
Unless someone comes with a compelling use case to allow bytestrings for
`EmailMessage` subject and body. Binary content should be left for
attachments.
--
Ticket URL: <https://code.djangoproject.com/ticket/28196#comment:2>
* status: new => closed
* resolution: => invalid
--
Ticket URL: <https://code.djangoproject.com/ticket/28196#comment:3>
Comment (by Claude Paroz <claude@…>):
In [changeset:"d4d812cb567d1f84ef7a569672fdf3c0b83e6fdd" d4d812c]:
{{{
#!CommitTicketReference repository=""
revision="d4d812cb567d1f84ef7a569672fdf3c0b83e6fdd"
Refs #28196 -- Removed mentions of bytestrings for EmailMessage
With Python 3, there are no more reasons to special-case EmailMessage
arguments which should be plain strings.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28196#comment:4>