Skip to content

Commit 3eb9ba8

Browse files
committed
bpo-47022: Document asynchat, asyncore and smtpd removals in 3.12
1 parent 2cf7f86 commit 3eb9ba8

File tree

8 files changed

+16
-3
lines changed

8 files changed

+16
-3
lines changed

Doc/library/asynchat.rst

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
**Source code:** :source:`Lib/asynchat.py`
1111

1212
.. deprecated:: 3.6
13+
:mod:`asynchat` will be removed in Python 3.12 (:pep:`594`).
1314
Please use :mod:`asyncio` instead.
1415

1516
--------------

Doc/library/asyncore.rst

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
**Source code:** :source:`Lib/asyncore.py`
1414

1515
.. deprecated:: 3.6
16+
:mod:`asyncore` will be removed in Python 3.12 (:pep:`594`).
1617
Please use :mod:`asyncio` instead.
1718

1819
--------------

Doc/library/smtpd.rst

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
This module offers several classes to implement SMTP (email) servers.
1515

1616
.. deprecated:: 3.6
17+
:mod:`smtpd` will be removed in Python 3.12 (:pep:`594`).
1718
The `aiosmtpd <https://aiosmtpd.readthedocs.io/>`_ package is a recommended
1819
replacement for this module. It is based on :mod:`asyncio` and provides a
1920
more straightforward API.

Doc/whatsnew/3.11.rst

+5
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,11 @@ Deprecated
523523
:func:`locale.getlocale` functions instead.
524524
(Contributed by Victor Stinner in :issue:`46659`.)
525525

526+
* The :mod:`asynchat`, :mod:`asyncore` and :mod:`smtpd` modules have been
527+
deprecated since at least Python 3.6. Their documentation and deprecation
528+
warnings have now been updated to note they will removed in Python 3.12
529+
(:pep:`594`).
530+
(Contributed by Hugo van Kemenade in :issue:`47022`.)
526531

527532
Removed
528533
=======

Lib/asynchat.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050

5151
from warnings import warn
5252
warn(
53-
'The asynchat module is deprecated. '
53+
'The asynchat module is deprecated and will be removed in Python 3.12. '
5454
'The recommended replacement is asyncio',
5555
DeprecationWarning,
5656
stacklevel=2)

Lib/asyncore.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
errorcode
5959

6060
warnings.warn(
61-
'The asyncore module is deprecated. '
61+
'The asyncore module is deprecated and will be removed in Python 3.12. '
6262
'The recommended replacement is asyncio',
6363
DeprecationWarning,
6464
stacklevel=2)

Lib/smtpd.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@
8585
]
8686

8787
warn(
88-
'The smtpd module is deprecated and unmaintained. Please see aiosmtpd '
88+
'The smtpd module is deprecated and unmaintained and will be removed '
89+
'in Python 3.12. Please see aiosmtpd '
8990
'(https://aiosmtpd.readthedocs.io/) for the recommended replacement.',
9091
DeprecationWarning,
9192
stacklevel=2)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
The :mod:`asynchat`, :mod:`asyncore` and :mod:`smtpd` modules have been
2+
deprecated since at least Python 3.6. Their documentation and deprecation
3+
warnings and have now been updated to note they will removed in Python 3.12
4+
(:pep:`594`).

0 commit comments

Comments
 (0)