Issue 26036: Unnecessary arguments on smtpd.SMTPServer (original) (raw)

Created on 2016-01-07 12:16 by sleepycal, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (6)
msg257684 - (view) Author: Cal Leeming (sleepycal) Date: 2016-01-07 12:16
`smtpd.SMTPServer` takes argument `remoteaddr`, however this is only used in subclass `smtpd.DebuggingServer`. Would anyone object to a patch which removes `remoteaddr` from `smtpd.SMTPServer.__init__` and places it into `smtpd.DebuggingServer.__init__` instead? Naturally this would be backwards incompatible
msg257692 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2016-01-07 14:29
We won't make such a backward-incompatible change. Because subclassing is how you extend SMTPServer, it's likely to be used by other derived classes, not in the standard library. I could see some argument for making it optional and default to None, but that's about the extent of what I would support. PS: It's used in PureProxy, not DebuggingServer (at least in 3.6, where I checked).
msg257693 - (view) Author: Cal Leeming (sleepycal) Date: 2016-01-07 14:47
Apologies for the typo, it is indeed `PureProxy`. Setting a default of `None` sounds like a good plan, since it won't break backwards compatibility.
msg258109 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2016-01-12 16:44
Tangentially, I'm kind of hoping we can get this into 3.6 as an asyncio replacement for smtpd: https://gitlab.com/python-smtpd-hackers/aiosmtpd
msg258110 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2016-01-12 17:07
I'd forgotten that issue 25008 is about deprecating SMTPServer (or not, there are multiple opinions on it).
msg309746 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2018-01-10 00:50
I'm closing this as won't fix simce smtpd.py is deprecated and likely won't see any future improvements. Please take a look at aiosmtpd as a much better third party replacement.
History
Date User Action Args
2022-04-11 14:58:25 admin set github: 70224
2018-01-10 00:50:19 barry set status: open -> closedresolution: wont fixmessages: + stage: resolved
2016-01-18 20:17:40 r.david.murray set nosy: + r.david.murray
2016-01-12 17:07:40 eric.smith set messages: +
2016-01-12 16:44:04 barry set messages: +
2016-01-08 18:40:30 terry.reedy set versions: + Python 3.6
2016-01-07 19:54:34 barry set nosy: + barry
2016-01-07 14:47:43 sleepycal set messages: +
2016-01-07 14:29:28 eric.smith set nosy: + eric.smithmessages: +
2016-01-07 12:16:23 sleepycal create