]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-47022: Document asynchat, asyncore and smtpd removals in 3.12 (GH-31891)
authorHugo van Kemenade <hugovk@users.noreply.github.com>
Fri, 18 Mar 2022 19:45:37 +0000 (21:45 +0200)
committerGitHub <noreply@github.com>
Fri, 18 Mar 2022 19:45:37 +0000 (12:45 -0700)
Document the deprecation of asyncore, asynchat, and smtpd with a slated removal in Python 3.12 thanks to PEP 594.

Doc/library/asynchat.rst
Doc/library/asyncore.rst
Doc/library/smtpd.rst
Doc/library/superseded.rst
Doc/whatsnew/3.11.rst
Lib/asynchat.py
Lib/asyncore.py
Lib/smtpd.py
Misc/NEWS.d/next/Library/2022-03-15-09-29-52.bpo-47022.uaEDcI.rst [new file with mode: 0644]

index 9e51416b83a570b45964431e85ef8b07070b27f5..4354444a1d3314a57d63dd5c38f15034143bd378 100644 (file)
@@ -3,6 +3,7 @@
 
 .. module:: asynchat
    :synopsis: Support for asynchronous command/response protocols.
+   :deprecated:
 
 .. moduleauthor:: Sam Rushing <rushing@nightmare.com>
 .. sectionauthor:: Steve Holden <sholden@holdenweb.com>
@@ -10,6 +11,7 @@
 **Source code:** :source:`Lib/asynchat.py`
 
 .. deprecated:: 3.6
+   :mod:`asynchat` will be removed in Python 3.12 (:pep:`594`).
    Please use :mod:`asyncio` instead.
 
 --------------
index a86518ebff2777eb12e75fb361950392145a2699..e481e13db76f70204b0990839170d9050bce22d1 100644 (file)
@@ -4,6 +4,7 @@
 .. module:: asyncore
    :synopsis: A base class for developing asynchronous socket handling
               services.
+   :deprecated:
 
 .. moduleauthor:: Sam Rushing <rushing@nightmare.com>
 .. sectionauthor:: Christopher Petrilli <petrilli@amber.org>
@@ -13,6 +14,7 @@
 **Source code:** :source:`Lib/asyncore.py`
 
 .. deprecated:: 3.6
+   :mod:`asyncore` will be removed in Python 3.12 (:pep:`594`).
    Please use :mod:`asyncio` instead.
 
 --------------
index 611411ddd295b26a926311cc1ef12d766bab5a0a..6b37a0517063d013deb87f47f5975bcc803d7ac6 100644 (file)
@@ -3,6 +3,7 @@
 
 .. module:: smtpd
    :synopsis: A SMTP server implementation in Python.
+   :deprecated:
 
 .. moduleauthor:: Barry Warsaw <barry@python.org>
 .. sectionauthor:: Moshe Zadka <moshez@moshez.org>
@@ -14,6 +15,7 @@
 This module offers several classes to implement SMTP (email) servers.
 
 .. deprecated:: 3.6
+   :mod:`smtpd` will be removed in Python 3.12 (:pep:`594`).
    The `aiosmtpd <https://aiosmtpd.readthedocs.io/>`_ package is a recommended
    replacement for this module.  It is based on :mod:`asyncio` and provides a
    more straightforward API.
index 50a5983236e76ae605e2399383c2f8f83ff66a2b..fd23e4d1536d389174d73707a62d90611a2be8eb 100644 (file)
@@ -10,5 +10,8 @@ backwards compatibility. They have been superseded by other modules.
 
 .. toctree::
 
-   optparse.rst
+   asynchat.rst
+   asyncore.rst
+   smtpd.rst
    imp.rst
+   optparse.rst
index 2af663809a448b2d96d0032136b326a9b68bdbd5..8b3450ed404f21f477b07647727079bf1e49d1c4 100644 (file)
@@ -555,6 +555,11 @@ Deprecated
   :func:`locale.getlocale` functions instead.
   (Contributed by Victor Stinner in :issue:`46659`.)
 
+* The :mod:`asynchat`, :mod:`asyncore` and  :mod:`smtpd` modules have been
+  deprecated since at least Python 3.6. Their documentation and deprecation
+  warnings have now been updated to note they will removed in Python 3.12
+  (:pep:`594`).
+  (Contributed by Hugo van Kemenade in :issue:`47022`.)
 
 Removed
 =======
index de26ffa648ffecd3b98beebd45e0846267e6edd7..e081e67c75acb01332bee52dcc05e81eac34d436 100644 (file)
@@ -50,7 +50,7 @@ from collections import deque
 
 from warnings import warn
 warn(
-    'The asynchat module is deprecated. '
+    'The asynchat module is deprecated and will be removed in Python 3.12. '
     'The recommended replacement is asyncio',
     DeprecationWarning,
     stacklevel=2)
index b1eea4bf652118498a0664152d3f87ca1807283d..a360d404395e5b1623b1b1393839b1174afd1865 100644 (file)
@@ -58,7 +58,7 @@ from errno import EALREADY, EINPROGRESS, EWOULDBLOCK, ECONNRESET, EINVAL, \
      errorcode
 
 warnings.warn(
-    'The asyncore module is deprecated. '
+    'The asyncore module is deprecated and will be removed in Python 3.12. '
     'The recommended replacement is asyncio',
     DeprecationWarning,
     stacklevel=2)
index 1cd004fbc6fe5b88a89775d520a4ea88eaf95e31..eeda155b920f7526c4779525a5cc60d5c0416fdd 100755 (executable)
@@ -85,7 +85,8 @@ __all__ = [
 ]
 
 warn(
-    'The smtpd module is deprecated and unmaintained.  Please see aiosmtpd '
+    'The smtpd module is deprecated and unmaintained and will be removed '
+    'in Python 3.12.  Please see aiosmtpd '
     '(https://aiosmtpd.readthedocs.io/) for the recommended replacement.',
     DeprecationWarning,
     stacklevel=2)
diff --git a/Misc/NEWS.d/next/Library/2022-03-15-09-29-52.bpo-47022.uaEDcI.rst b/Misc/NEWS.d/next/Library/2022-03-15-09-29-52.bpo-47022.uaEDcI.rst
new file mode 100644 (file)
index 0000000..0e867b9
--- /dev/null
@@ -0,0 +1,4 @@
+The :mod:`asynchat`, :mod:`asyncore` and  :mod:`smtpd` modules have been
+deprecated since at least Python 3.6. Their documentation and deprecation
+warnings and have now been updated to note they will removed in Python 3.12
+(:pep:`594`).