[issue38332] invalid content-transfer-encoding in encoded-word causes KeyError

2019-10-01 Thread Andrei Troie
Andrei Troie added the comment: I agree with you that according to the RFC, the cte can of course only be "B" or "Q". My point is that, in my example, if you try to do that you get a KeyError propagating all the way down to email.message.get(), which I believe is inco

[issue38332] invalid content-transfer-encoding in encoded-word causes KeyError

2019-10-01 Thread Andrei Troie
Change by Andrei Troie : -- keywords: +patch pull_requests: +16094 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16503 ___ Python tracker <https://bugs.python.org/issu

[issue38332] invalid content-transfer-encoding in encoded-word causes KeyError

2019-09-30 Thread Andrei Troie
New submission from Andrei Troie : The following will cause a KeyError on email.message.get() import email import email.policy text = "Subject: =?us-ascii?X?somevalue?=" eml = email.message_from_string(text, policy=email.policy.default) eml.get('Subject') This is caused

[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 mas

[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 <https://bugs.python.org/issue38232> ___ ___ 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