Vinay Sajip <vinay_sa...@yahoo.co.uk> added the comment:

> Well, other tests manage it even without using a private socket map.
> Leaving dangling sockets in the socket map could mean your code
> forgets to close them, for example.

This issue is not about getting test_logging to work in a particular way; 
test_logging is exercising SMTPHandler and (AFAIK) tidying up after itself, 
with no sockets left open.

When working on the test, I just noticed that smtpd forces use of the global 
socket map, which is not ideal ("The fact that asyncore uses a global socket 
map is surely unfortunate" - Giampaolo). Given that asyncore's design allows 
for a socket map to be passed in (at least in part - RDM's comment), ISTM that 
it should support this consistently, and also that smtpd should support this 
mode of use.

----------

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

Reply via email to