summaryrefslogtreecommitdiffstats
path: root/Lib/smtpd.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/smtpd.py')
-rwxr-xr-xLib/smtpd.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/Lib/smtpd.py b/Lib/smtpd.py
index 1e2adc8..bc43331 100755
--- a/Lib/smtpd.py
+++ b/Lib/smtpd.py
@@ -83,8 +83,6 @@ import errno
import getopt
import time
import socket
-import asyncore
-import asynchat
import collections
from warnings import warn
from email._header_value_parser import get_addr_spec, get_angle_addr
@@ -94,6 +92,19 @@ __all__ = [
"MailmanProxy",
]
+warn(
+ 'The smtpd module is deprecated and unmaintained. Please see aiosmtpd '
+ '(https://aiosmtpd.readthedocs.io/) for the recommended replacement.',
+ DeprecationWarning,
+ stacklevel=2)
+
+
+# These are imported after the above warning so that users get the correct
+# deprecation warning.
+import asyncore
+import asynchat
+
+
program = sys.argv[0]
__version__ = 'Python SMTP proxy version 0.3'