Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
bpo-47022: Document asynchat, asyncore and smtpd removals in 3.12
  • Loading branch information
hugovk committed Mar 15, 2022
commit 3eb9ba8be5a54db3d2b8377cdeb30e26ef8562ab
1 change: 1 addition & 0 deletions Doc/library/asynchat.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,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.

--------------
Expand Down
1 change: 1 addition & 0 deletions Doc/library/asyncore.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,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.

--------------
Expand Down
1 change: 1 addition & 0 deletions Doc/library/smtpd.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,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.
Expand Down
5 changes: 5 additions & 0 deletions Doc/whatsnew/3.11.rst
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,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
=======
Expand Down
2 changes: 1 addition & 1 deletion Lib/asynchat.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion Lib/asyncore.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion Lib/smtpd.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
@@ -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`).