R. David Murray added the comment:

Milan: using 'localhost' is incorrect, since the string 'localhost' will not 
always resolve to the local host IP, while passing None to getaddrinfo will.

It is significant that the example fails.  We need a test for this case (the 
imap tests have been historically very poor, though we've improved that 
somewhat in the past few years).

Although it is a low-probability thing, someone might be depending on self.host 
being '' by default, so I think the better (and simpler) fix is to convert '' 
to None in the _create_socket method.

----------

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

Reply via email to