[issue39384] Email parser creates a message object that can't be flattened as bytes.

2020-02-05 Thread Mark Sapiro
Mark Sapiro added the comment: I've researched this further, and I know how this happens. The original message contains a text/html part (in my case, the only part) which contains a base64 or quoted-printable body which when decoded contains non-ascii. It is parsed correctly by

[issue39384] Email parser creates a message object that can't be flattened as bytes.

2020-02-04 Thread R. David Murray
R. David Murray added the comment: message_from_bytes -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39384] Email parser creates a message object that can't be flattened as bytes.

2020-02-04 Thread R. David Murray
R. David Murray added the comment: If we can get an actual reproducer using message_as_bytes I'd feel more comfortable with the fix. I worry that there is some other bug this is exposing that should be fixed instead. -- ___ Python tracker

[issue39384] Email parser creates a message object that can't be flattened as bytes.

2020-02-04 Thread Mark Sapiro
Mark Sapiro added the comment: Other Mailman3 installations are also encountering this issue. See https://lists.mailman3.org/archives/list/mailman-us...@mailman3.org/message/VQZORIDL5PNQ4W33KIMVTFTANSGZD46S/ -- ___ Python tracker

[issue39384] Email parser creates a message object that can't be flattened as bytes.

2020-01-20 Thread Mark Sapiro
Mark Sapiro added the comment: This came about because of an actual situation in a Mailman 3 installation. I can't say for sure what the actual original message looked like, but it was received by Mailman's LMTP server and parsed with email.message_from_bytes(), so it clearly wasn't exactly

[issue39384] Email parser creates a message object that can't be flattened as bytes.

2020-01-20 Thread R. David Murray
R. David Murray added the comment: Since you parsed it as a string it is not really legitimate to serialize it as bytes. (That will work if the input message only contains ascii, but not if it contains unicode). You'll get the same error if you replace the garbage with the "’". Using

[issue39384] Email parser creates a message object that can't be flattened as bytes.

2020-01-18 Thread Mark Sapiro
Change by Mark Sapiro : -- versions: +Python 3.8, Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39384] Email parser creates a message object that can't be flattened as bytes.

2020-01-18 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +17449 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18056 ___ Python tracker ___

[issue39384] Email parser creates a message object that can't be flattened as bytes.

2020-01-18 Thread Mark Sapiro
New submission from Mark Sapiro : This is similar to https://bugs.python.org/issue32330 but is the opposite behavior. In that issue, the message couldn't be flattened as a string but could be flattened as bytes. Here, the message can be flattened as a string but can't be flattened as bytes.