Skip to content

Commit 822922a

Browse files
samuelcolvinmiss-islington
authored andcommitted
bpo-35800: Deprecate smtpd.MailmanProxy (GH-11675)
Since `smtpd.MailmanProxy` is already broken, it is not formally deprecated in 3.9. It will be removed in 3.10. https://bugs.python.org/issue35800
1 parent 19a3d87 commit 822922a

4 files changed

Lines changed: 10 additions & 0 deletions

File tree

Doc/library/smtpd.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,12 @@ MailmanProxy Objects
148148

149149
.. class:: MailmanProxy(localaddr, remoteaddr)
150150

151+
.. deprecated-removed:: 3.9 3.11
152+
153+
:class:`MailmanProxy` is deprecated, it depends on a ``Mailman``
154+
module which no longer exists and therefore is already broken.
155+
156+
151157
Create a new pure proxy server. Arguments are as per :class:`SMTPServer`.
152158
Everything will be relayed to *remoteaddr*, unless local mailman configurations
153159
knows about an address, in which case it will be handled via mailman. Note that

Lib/smtpd.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -779,6 +779,8 @@ def _deliver(self, mailfrom, rcpttos, data):
779779

780780
class MailmanProxy(PureProxy):
781781
def __init__(self, *args, **kwargs):
782+
warn('MailmanProxy is deprecated and will be removed '
783+
'in future', DeprecationWarning, 2)
782784
if 'enable_SMTPUTF8' in kwargs and kwargs['enable_SMTPUTF8']:
783785
raise ValueError("MailmanProxy does not support SMTPUTF8.")
784786
super(PureProxy, self).__init__(*args, **kwargs)

Misc/ACKS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,7 @@ Benjamin Collar
321321
Jeffery Collins
322322
Robert Collins
323323
Paul Colomiets
324+
Samuel Colvin
324325
Christophe Combelles
325326
Geremy Condra
326327
Denver Coneybeare
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Deprecate ``smtpd.MailmanProxy`` ready for future removal.

0 commit comments

Comments
 (0)