Aaryn Tonita added the comment:
Although I am not personally interested in backporting a fix for this issue,
anyone that experiences this issue in python 3.5 can execute the following
monkey patch to solve the issue:
def _fix_issue_36041_3_5():
from email._header_value_parser import
Aaryn Tonita added the comment:
Sorry about the delay. I opened pull request
https://github.com/python/cpython/pull/12054 for this. Let me know if you need
anything else.
--
___
Python tracker
<https://bugs.python.org/issue36
Aaryn Tonita added the comment:
Sure thing, I'll try to produce something tomorrow.
--
___
Python tracker
<https://bugs.python.org/issue36041>
___
___
Python-bug
Aaryn Tonita added the comment:
Hi David, the problem is in email._header_value_parser._refold_parse_tree.
Specifically, when the parsetree renders too long, it recursively gets newparts
= list(part) (the children). When it does this to a BareQuotedString node, the
child nodes are unquoted
New submission from Aaryn Tonita :
When using a policy for an EmailMessage that triggers folding (during
serialization) of a fairly long display_name in an address field, the folding
process removes the quotes from the display name breaking the semantics of the
field.
In particular