R. David Murray <[email protected]> added the comment:
Thanks for working on this.
The tests seem to be missing, as is the line that adds 'clean' to the def, so
the patches won't work as is.
However, now that I've looked at the patch in more detail, adding a parameter
to a public method is not something we can do in a bug fix release. So, this
solution would work for 3.3, but not for 2.7 and 3.2. In any case, Guido
thinks that parameters that have only two values should be replaced by methods
with two different names. In this case that makes a lot of sense. I've
checked the RFC and the code, and there are two cases: MAIL FROM and RCPT TO,
which require the address to be in <>s, and VRFY and EXPN, which prefer that it
not be in <>s. So I think we should introduce a new, private function for use
in the VRFY and EXPN cases:
def _addronly(addr):
(fullname, email) = email.utils.parseaddr(addr)
return email
Can you do a new patch, adding the above function and using it at the right
places? Tests are also needed...it should be possible to modify the test that
the original patch modified so that it checks to make sure the <> are not
added. If you need help with that let me know.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue7484>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com