Skip to content

Commit 5419793

Browse files
committed
[3.9] bpo-47022: Document asynchat, asyncore and smtpd removals in 3.12 (pythonGH-31891)
Document the deprecation of asyncore, asynchat, and smtpd with a slated removal in Python 3.12 thanks to PEP 594.. (cherry picked from commit 7747384) Co-authored-by: Hugo van Kemenade <[email protected]>
1 parent e207d72 commit 5419793

File tree

5 files changed

+17
-6
lines changed

5 files changed

+17
-6
lines changed

Doc/library/asynchat.rst

+2
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@
33

44
.. module:: asynchat
55
:synopsis: Support for asynchronous command/response protocols.
6+
:deprecated:
67

78
.. moduleauthor:: Sam Rushing <[email protected]>
89
.. sectionauthor:: Steve Holden <[email protected]>
910

1011
**Source code:** :source:`Lib/asynchat.py`
1112

1213
.. deprecated:: 3.6
14+
:mod:`asynchat` will be removed in Python 3.12 (:pep:`594`).
1315
Please use :mod:`asyncio` instead.
1416

1517
--------------

Doc/library/asyncore.rst

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
.. module:: asyncore
55
:synopsis: A base class for developing asynchronous socket handling
66
services.
7+
:deprecated:
78

89
.. moduleauthor:: Sam Rushing <[email protected]>
910
.. sectionauthor:: Christopher Petrilli <[email protected]>
@@ -13,6 +14,7 @@
1314
**Source code:** :source:`Lib/asyncore.py`
1415

1516
.. deprecated:: 3.6
17+
:mod:`asyncore` will be removed in Python 3.12 (:pep:`594`).
1618
Please use :mod:`asyncio` instead.
1719

1820
--------------

Doc/library/smtpd.rst

+6-5
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
.. module:: smtpd
55
:synopsis: A SMTP server implementation in Python.
6+
:deprecated:
67

78
.. moduleauthor:: Barry Warsaw <[email protected]>
89
.. sectionauthor:: Moshe Zadka <[email protected]>
@@ -13,11 +14,11 @@
1314

1415
This module offers several classes to implement SMTP (email) servers.
1516

16-
.. seealso::
17-
18-
The `aiosmtpd <http://aiosmtpd.readthedocs.io/>`_ package is a recommended
19-
replacement for this module. It is based on :mod:`asyncio` and provides a
20-
more straightforward API. :mod:`smtpd` should be considered deprecated.
17+
.. deprecated:: 3.6
18+
:mod:`smtpd` will be removed in Python 3.12 (:pep:`594`).
19+
The `aiosmtpd <https://aiosmtpd.readthedocs.io/>`_ package is a recommended
20+
replacement for this module. It is based on :mod:`asyncio` and provides a
21+
more straightforward API.
2122

2223
Several server implementations are present; one is a generic
2324
do-nothing implementation, which can be overridden, while the other two offer

Doc/library/superseded.rst

+4-1
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,8 @@ backwards compatibility. They have been superseded by other modules.
1010

1111
.. toctree::
1212

13-
optparse.rst
13+
asynchat.rst
14+
asyncore.rst
15+
smtpd.rst
1416
imp.rst
17+
optparse.rst
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
The :mod:`asynchat`, :mod:`asyncore` and :mod:`smtpd` modules have been
2+
deprecated since at least Python 3.6. Their documentation has now been
3+
updated to note they will removed in Python 3.12 (:pep:`594`).

0 commit comments

Comments
 (0)