Ross Rhodes <ross.rho...@hotmail.co.uk> added the comment:
Hi Konstantin, Thanks for raising this issue. It appears the field provided in your example does not conform to RFC 2822 followed by this email library. Square brackets are treated as special characters in [section 3.2.1](https://tools.ietf.org/html/rfc2822#section-3.2.1), which is handled in the [_parseaddr](https://github.com/python/cpython/blob/master/Lib/email/_parseaddr.py#L219) file. The above combined with the fact that any [failed parsing returns an two-tuple of ('', '')](https://github.com/python/cpython/blob/master/Lib/email/utils.py#L212) I believe explains the behavior observed. ---------- nosy: +trrhodes _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue42787> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com