Closed jfly closed 6 years ago
For the record, I dug into this, and this appears to be a side effect of adding support for python 3. This code: https://github.com/mailgun/flanker/blob/v0.9.0/flanker/_email.py#L29-L33 clobbers some constants named NL
in Python 2's email
package (changing them from \n
to \r\n
).
According to RFC2822
Messages are divided into lines of characters. A line is a series of characters that is delimited with the two characters carriage-return and line-feed; that is, the carriage return (CR) character (ASCII value 13) followed immediately by the line feed (LF) character (ASCII value 10). (The carriage-return/line-feed pair is usually written in this document as "CRLF".)
We are consciously trying to ensure that CRLF is used consistently. It is mentioned in the change log. This change should not cause any real world issues. For the except of some very verbatim tests failing.
So I am closing this as "by design".
We're using Python 2 and Flanker 0.9.0:
Note that before importing
address
, there was a\n
character inserted into the string, and after importingaddress
, there is a\r\n
inserted into the string.I don't actually know much about the email specs, but this seems like a backwards compatibility issue, even if it's addressing a bug in python 2.7.12.
Just to confirm, this doesn't happen with Flanker 0.8.5: