From b70ab2c1ddc6000099dc982482cf00d04b8defcf Mon Sep 17 00:00:00 2001 From: Samuel Colvin Date: Fri, 25 Jan 2019 17:13:44 +0000 Subject: [PATCH 1/4] deprecate MailmanProxy --- Doc/library/smtpd.rst | 6 ++++++ Lib/smtpd.py | 2 ++ Misc/ACKS | 1 + .../next/Library/2019-01-25-17-12-17.bpo-35800.MCGJdQ.rst | 1 + 4 files changed, 10 insertions(+) create mode 100644 Misc/NEWS.d/next/Library/2019-01-25-17-12-17.bpo-35800.MCGJdQ.rst diff --git a/Doc/library/smtpd.rst b/Doc/library/smtpd.rst index 85ee8a75cf77a9a..3217cfb9264e01b 100644 --- a/Doc/library/smtpd.rst +++ b/Doc/library/smtpd.rst @@ -148,6 +148,12 @@ MailmanProxy Objects .. class:: MailmanProxy(localaddr, remoteaddr) + .. deprecated-removed:: 3.8 3.9 + + :class:`MailmanProxy` is deprecated, it depends on a ``Mailman`` + module which no long exists and therefore is already broken. + + Create a new pure proxy server. Arguments are as per :class:`SMTPServer`. 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 diff --git a/Lib/smtpd.py b/Lib/smtpd.py index 8103ca9af0d7b3f..8f1a22e937871d6 100755 --- a/Lib/smtpd.py +++ b/Lib/smtpd.py @@ -779,6 +779,8 @@ def _deliver(self, mailfrom, rcpttos, data): class MailmanProxy(PureProxy): 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']: raise ValueError("MailmanProxy does not support SMTPUTF8.") super(PureProxy, self).__init__(*args, **kwargs) diff --git a/Misc/ACKS b/Misc/ACKS index c9fa08bd614138f..3715bdc0c0169fc 100644 --- a/Misc/ACKS +++ b/Misc/ACKS @@ -313,6 +313,7 @@ Benjamin Collar Jeffery Collins Robert Collins Paul Colomiets +Samuel Colvin Christophe Combelles Geremy Condra Denver Coneybeare diff --git a/Misc/NEWS.d/next/Library/2019-01-25-17-12-17.bpo-35800.MCGJdQ.rst b/Misc/NEWS.d/next/Library/2019-01-25-17-12-17.bpo-35800.MCGJdQ.rst new file mode 100644 index 000000000000000..27e8d0bb3a0976c --- /dev/null +++ b/Misc/NEWS.d/next/Library/2019-01-25-17-12-17.bpo-35800.MCGJdQ.rst @@ -0,0 +1 @@ +Deprecate ``smtpd.MailmanProxy`` ready for future removal. From ed402e55da25cbad2b8970347391db7c03a7c07e Mon Sep 17 00:00:00 2001 From: Samuel Colvin Date: Mon, 28 Jan 2019 11:11:14 +0000 Subject: [PATCH 2/4] change deprecated-removed to "3.8 3.10" --- Doc/library/smtpd.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/smtpd.rst b/Doc/library/smtpd.rst index 3217cfb9264e01b..5a559fd95ca9417 100644 --- a/Doc/library/smtpd.rst +++ b/Doc/library/smtpd.rst @@ -148,7 +148,7 @@ MailmanProxy Objects .. class:: MailmanProxy(localaddr, remoteaddr) - .. deprecated-removed:: 3.8 3.9 + .. deprecated-removed:: 3.8 3.10 :class:`MailmanProxy` is deprecated, it depends on a ``Mailman`` module which no long exists and therefore is already broken. From 5520cb627ef428bc38f9b2eb3e437b0115ead04e Mon Sep 17 00:00:00 2001 From: Samuel Colvin Date: Thu, 7 Feb 2019 10:34:38 +0000 Subject: [PATCH 3/4] fix typo in deprecation warning --- Doc/library/smtpd.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/smtpd.rst b/Doc/library/smtpd.rst index 5a559fd95ca9417..54c16c43f60249a 100644 --- a/Doc/library/smtpd.rst +++ b/Doc/library/smtpd.rst @@ -151,7 +151,7 @@ MailmanProxy Objects .. deprecated-removed:: 3.8 3.10 :class:`MailmanProxy` is deprecated, it depends on a ``Mailman`` - module which no long exists and therefore is already broken. + module which no longer exists and therefore is already broken. Create a new pure proxy server. Arguments are as per :class:`SMTPServer`. From a9f8153d527862b35a875408309271127ae0d7d8 Mon Sep 17 00:00:00 2001 From: Samuel Colvin Date: Tue, 8 Oct 2019 19:51:18 +0100 Subject: [PATCH 4/4] move to be deprecated in 3.9 and removed in 3.11 --- Doc/library/smtpd.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/smtpd.rst b/Doc/library/smtpd.rst index 54c16c43f60249a..d84e74a8ceaaff5 100644 --- a/Doc/library/smtpd.rst +++ b/Doc/library/smtpd.rst @@ -148,7 +148,7 @@ MailmanProxy Objects .. class:: MailmanProxy(localaddr, remoteaddr) - .. deprecated-removed:: 3.8 3.10 + .. 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.