Commit 822922af authored by Samuel Colvin's avatar Samuel Colvin Committed by Miss Islington (bot)

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
parent 19a3d873
...@@ -148,6 +148,12 @@ MailmanProxy Objects ...@@ -148,6 +148,12 @@ MailmanProxy Objects
.. class:: MailmanProxy(localaddr, remoteaddr) .. class:: MailmanProxy(localaddr, remoteaddr)
.. deprecated-removed:: 3.9 3.11
:class:`MailmanProxy` is deprecated, it depends on a ``Mailman``
module which no longer exists and therefore is already broken.
Create a new pure proxy server. Arguments are as per :class:`SMTPServer`. Create a new pure proxy server. Arguments are as per :class:`SMTPServer`.
Everything will be relayed to *remoteaddr*, unless local mailman configurations Everything will be relayed to *remoteaddr*, unless local mailman configurations
knows about an address, in which case it will be handled via mailman. Note that knows about an address, in which case it will be handled via mailman. Note that
......
...@@ -779,6 +779,8 @@ class PureProxy(SMTPServer): ...@@ -779,6 +779,8 @@ class PureProxy(SMTPServer):
class MailmanProxy(PureProxy): class MailmanProxy(PureProxy):
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
warn('MailmanProxy is deprecated and will be removed '
'in future', DeprecationWarning, 2)
if 'enable_SMTPUTF8' in kwargs and kwargs['enable_SMTPUTF8']: if 'enable_SMTPUTF8' in kwargs and kwargs['enable_SMTPUTF8']:
raise ValueError("MailmanProxy does not support SMTPUTF8.") raise ValueError("MailmanProxy does not support SMTPUTF8.")
super(PureProxy, self).__init__(*args, **kwargs) super(PureProxy, self).__init__(*args, **kwargs)
......
...@@ -321,6 +321,7 @@ Benjamin Collar ...@@ -321,6 +321,7 @@ Benjamin Collar
Jeffery Collins Jeffery Collins
Robert Collins Robert Collins
Paul Colomiets Paul Colomiets
Samuel Colvin
Christophe Combelles Christophe Combelles
Geremy Condra Geremy Condra
Denver Coneybeare Denver Coneybeare
......
Deprecate ``smtpd.MailmanProxy`` ready for future removal.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment