[New-bugs-announce] [issue11959] smtpd cannot be used without affecting global state

Vinay Sajip report at bugs.python.org
Fri Apr 29 23:12:30 CEST 2011


New submission from Vinay Sajip <vinay_sajip at yahoo.co.uk>:

It seems not possible to use smtpd in certain contexts, because it forces use of global state. For example, I'm looking at implementing a test SMTP server to test logging's SMTPHandler. Neither SMTPServer nor SMTPChannel allow a map to be passed in, forcing use of the global socket_map in asyncore. Both of these classes should accept an optional map argument - the map passed to SMTPServer should be stored in the server instance and passed when creating an SMTPChannel in handle_accepted.

----------
components: Library (Lib)
messages: 134812
nosy: giampaolo.rodola, vinay.sajip
priority: normal
severity: normal
status: open
title: smtpd cannot be used without affecting global state
type: behavior
versions: Python 3.3

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11959>
_______________________________________


More information about the New-bugs-announce mailing list