R. David Murray added the comment:

OK, I've finally had time to review this, sorry for the delay.

The impalib mechanism is tailored to how imap works (that's the whole thing 
about "continuation response".  smtplib auth works a bit differently, and your 
adaptation looks OK to me.  The accompanying docstrings are a bit confusing, 
though, since they copy the imaplib language, which isn't entirely applicable.  
Instead of talking about a 'continuation response', it should talk about a '334 
challenge response', I think.

Also, both the imaplib and smptlib methods are named after the corresponding 
command names in the protocol.  So for imaplib we have 'authenticate', but for 
smtplib it should be 'auth'.

I also think we should expose the supported auth methods as part of the public 
API.

I think exposing the preferred auth list is premature, since if we are going to 
do that we need to have a way to add elements to that list for the users's own 
auth methods and we don't have that.  So let's confine this issue to adding the 
'auth' method and using it in the login method.

The tests should include a new test of calling the auth method directly.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15014>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to