]> granicus.if.org Git - python/commit
#9286: Fix the rfc822 parser to preserve whitespace in address local part.
authorR. David Murray <rdmurray@bitdance.com>
Sat, 18 Dec 2010 18:25:38 +0000 (18:25 +0000)
committerR. David Murray <rdmurray@bitdance.com>
Sat, 18 Dec 2010 18:25:38 +0000 (18:25 +0000)
commit63563cdf9d3afe0bdffaece7b92b0a56d2360397
tree6f3004bbefd6bd75e9f841307668676fb075aa51
parent2b37ce7f30b94fc5ec8adb042554f3cc320f7af2
#9286: Fix the rfc822 parser to preserve whitespace in address local part.

Such addresses are not RFC compliant except under the 'obsolete syntax'
rules, but before this fix the whitespace was dropped from the input,
concatenating the pieces.  That breaks one of the principles of the
email package, that of preserving the input as much as possible.
It also denies the application program the opportunity to apply its
own heuristics to interpretation of such non-compliant addresses.

It is possible users of the email package were depending on the local
part always being a single token, so this fix will not be backported.
Lib/email/_parseaddr.py
Lib/email/test/test_email.py
Misc/NEWS