[issue44694] Message from BytesParser cannot be flattened immediately

2021-07-24 Thread Vitas Ivanoff
Change by Vitas Ivanoff : Added file: https://bugs.python.org/file50178/0.msg ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue44694] Message from BytesParser cannot be flattened immediately

2021-07-23 Thread R. David Murray
R. David Murray added the comment: I suspect maxheaderlen=0 works because it causes the original lines to be re-emitted without any folding or other processing. Without that, lines longer than the default max_line_length get refolded. Can you provide an example of an input message that trig

[issue44694] Message from BytesParser cannot be flattened immediately

2021-07-21 Thread Vitas Ivanoff
New submission from Vitas Ivanoff : Hello. Here is my code: #Parse message from file and immediately flatten it cur_policy = email.policy.SMTPUTF8 with open("/tmp/0.tmp", "rb") as orig_message_file: message_bytes = orig_message_file.read() message_parser = BytesParser(policy=cur_policy) msg