[Python-checkins] bpo-47022: Document asynchat, asyncore and smtpd removals in 3.12 (GH-31891)
miss-islington
webhook-mailer at python.org
Fri Mar 18 15:45:55 EDT 2022
https://github.com/python/cpython/commit/77473846439b8a3eae66de1a1cfe931619f38513
commit: 77473846439b8a3eae66de1a1cfe931619f38513
branch: main
author: Hugo van Kemenade <hugovk at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2022-03-18T12:45:37-07:00
summary:
bpo-47022: Document asynchat, asyncore and smtpd removals in 3.12 (GH-31891)
Document the deprecation of asyncore, asynchat, and smtpd with a slated removal in Python 3.12 thanks to PEP 594.
files:
A Misc/NEWS.d/next/Library/2022-03-15-09-29-52.bpo-47022.uaEDcI.rst
M Doc/library/asynchat.rst
M Doc/library/asyncore.rst
M Doc/library/smtpd.rst
M Doc/library/superseded.rst
M Doc/whatsnew/3.11.rst
M Lib/asynchat.py
M Lib/asyncore.py
M Lib/smtpd.py
diff --git a/Doc/library/asynchat.rst b/Doc/library/asynchat.rst
index 9e51416b83a57..4354444a1d331 100644
--- a/Doc/library/asynchat.rst
+++ b/Doc/library/asynchat.rst
@@ -3,6 +3,7 @@
.. module:: asynchat
:synopsis: Support for asynchronous command/response protocols.
+ :deprecated:
.. moduleauthor:: Sam Rushing <rushing at nightmare.com>
.. sectionauthor:: Steve Holden <sholden at 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.
--------------
diff --git a/Doc/library/asyncore.rst b/Doc/library/asyncore.rst
index a86518ebff277..e481e13db76f7 100644
--- a/Doc/library/asyncore.rst
+++ b/Doc/library/asyncore.rst
@@ -4,6 +4,7 @@
.. module:: asyncore
:synopsis: A base class for developing asynchronous socket handling
services.
+ :deprecated:
.. moduleauthor:: Sam Rushing <rushing at nightmare.com>
.. sectionauthor:: Christopher Petrilli <petrilli at 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.
--------------
diff --git a/Doc/library/smtpd.rst b/Doc/library/smtpd.rst
index 611411ddd295b..6b37a0517063d 100644
--- a/Doc/library/smtpd.rst
+++ b/Doc/library/smtpd.rst
@@ -3,6 +3,7 @@
.. module:: smtpd
:synopsis: A SMTP server implementation in Python.
+ :deprecated:
.. moduleauthor:: Barry Warsaw <barry at python.org>
.. sectionauthor:: Moshe Zadka <moshez at 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.
diff --git a/Doc/library/superseded.rst b/Doc/library/superseded.rst
index 50a5983236e76..fd23e4d1536d3 100644
--- a/Doc/library/superseded.rst
+++ b/Doc/library/superseded.rst
@@ -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
diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst
index 2af663809a448..8b3450ed404f2 100644
--- a/Doc/whatsnew/3.11.rst
+++ b/Doc/whatsnew/3.11.rst
@@ -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
=======
diff --git a/Lib/asynchat.py b/Lib/asynchat.py
index de26ffa648ffe..e081e67c75acb 100644
--- a/Lib/asynchat.py
+++ b/Lib/asynchat.py
@@ -50,7 +50,7 @@
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)
diff --git a/Lib/asyncore.py b/Lib/asyncore.py
index b1eea4bf65211..a360d404395e5 100644
--- a/Lib/asyncore.py
+++ b/Lib/asyncore.py
@@ -58,7 +58,7 @@
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)
diff --git a/Lib/smtpd.py b/Lib/smtpd.py
index 1cd004fbc6fe5..eeda155b920f7 100755
--- a/Lib/smtpd.py
+++ b/Lib/smtpd.py
@@ -85,7 +85,8 @@
]
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
index 0000000000000..0e867b9506484
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2022-03-15-09-29-52.bpo-47022.uaEDcI.rst
@@ -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`).
More information about the Python-checkins
mailing list