[Python-checkins] r45829 - in python/branches/release24-maint/Lib: email/_parseaddr.py email/test/test_email.py rfc822.py test/test_rfc822.py (original) (raw)

barry.warsaw python-checkins at python.org
Sun Apr 30 23:26:42 CEST 2006


Author: barry.warsaw Date: Sun Apr 30 23:26:41 2006 New Revision: 45829

Modified: python/branches/release24-maint/Lib/email/_parseaddr.py python/branches/release24-maint/Lib/email/test/test_email.py python/branches/release24-maint/Lib/rfc822.py python/branches/release24-maint/Lib/test/test_rfc822.py Log: Patch #1464708 from William McVey: fixed handling of nested comments in mail addresses. E.g.

"Foo ((Foo Bar)) <foo at example.com>"

Fixes for both rfc822.py and email package. This patch needs to be back ported to Python 2.3 for email 2.5 and forward ported to Python 2.5 for email 4.0. (I'll do both soon)

Modified: python/branches/release24-maint/Lib/email/_parseaddr.py

--- python/branches/release24-maint/Lib/email/_parseaddr.py (original) +++ python/branches/release24-maint/Lib/email/_parseaddr.py Sun Apr 30 23:26:41 2006 @@ -360,6 +360,7 @@ break elif allowcomments and self.field[self.pos] == '(': slist.append(self.getcomment())

Modified: python/branches/release24-maint/Lib/email/test/test_email.py

--- python/branches/release24-maint/Lib/email/test/test_email.py (original) +++ python/branches/release24-maint/Lib/email/test/test_email.py Sun Apr 30 23:26:41 2006 @@ -2212,6 +2212,12 @@ ['foo: ;', '"Jason R. Mastaler" <jason at dom.ain>']), [('', ''), ('Jason R. Mastaler', 'jason at dom.ain')])

Modified: python/branches/release24-maint/Lib/rfc822.py

--- python/branches/release24-maint/Lib/rfc822.py (original) +++ python/branches/release24-maint/Lib/rfc822.py Sun Apr 30 23:26:41 2006 @@ -711,6 +711,7 @@ break elif allowcomments and self.field[self.pos] == '(': slist.append(self.getcomment())

Modified: python/branches/release24-maint/Lib/test/test_rfc822.py

--- python/branches/release24-maint/Lib/test/test_rfc822.py (original) +++ python/branches/release24-maint/Lib/test/test_rfc822.py Sun Apr 30 23:26:41 2006 @@ -45,6 +45,10 @@ print 'extra parsed address:', repr(n), repr(a) continue i = i + 1

@@ -129,6 +133,12 @@ 'To: person at dom.ain (User J. Person)\n\n', [('User J. Person', 'person at dom.ain')])



More information about the Python-checkins mailing list