[issue38232] empty local-part in addr_spec displayed incorrectly

2019-10-04 Thread Abhilash Raj
Abhilash Raj added the comment: It is actually parsed correctly and serialized back when you try to convert it to a string representation: from email.parser import BytesFeedParser import email.policy def main(): eml_string = 'From: Nobody <""@example.org>' parser =

[issue38232] empty local-part in addr_spec displayed incorrectly

2019-09-23 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +maxking ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38232] empty local-part in addr_spec displayed incorrectly

2019-09-23 Thread Andrei Troie
Andrei Troie added the comment: As far as I understand it, this is due to the following code in email.headerregistry.Address.addr_spec (in 3.8 and below): if len(nameset) > len(nameset-parser.DOT_ATOM_ENDS): lp = parser.quote_string(self.username) or, in the current version on master:

[issue38232] empty local-part in addr_spec displayed incorrectly

2019-09-20 Thread Andrei Troie
Change by Andrei Troie : -- versions: +Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38232] empty local-part in addr_spec displayed incorrectly

2019-09-20 Thread Andrei Troie
New submission from Andrei Troie : Given an (RFC-legal) email address with the local part consisting of a quoted empty string (e.g. 'Nobody <""@example.org>'), when I call the 'addr_spec' property, the result no longer includes the quoted empty string (so, in this case, addr_spec would