mirror of
https://github.com/python/cpython.git
synced 2025-08-27 12:16:04 +00:00
bpo-47061: use warnings._deprecated()
with asynchat, asyncore, and smtpd (GH-32350)
This commit is contained in:
parent
59a99ae277
commit
32b33879c2
3 changed files with 14 additions and 18 deletions
|
@ -57,11 +57,9 @@ from errno import EALREADY, EINPROGRESS, EWOULDBLOCK, ECONNRESET, EINVAL, \
|
|||
ENOTCONN, ESHUTDOWN, EISCONN, EBADF, ECONNABORTED, EPIPE, EAGAIN, \
|
||||
errorcode
|
||||
|
||||
warnings.warn(
|
||||
'The asyncore module is deprecated and will be removed in Python 3.12. '
|
||||
'The recommended replacement is asyncio',
|
||||
DeprecationWarning,
|
||||
stacklevel=2)
|
||||
_DEPRECATION_MSG = ('The {name} module is deprecated and will be removed in '
|
||||
'Python {remove}. The recommended replacement is asyncio')
|
||||
warnings._deprecated(__name__, _DEPRECATION_MSG, remove=(3, 12))
|
||||
|
||||
|
||||
_DISCONNECTED = frozenset({ECONNRESET, ENOTCONN, ESHUTDOWN, ECONNABORTED, EPIPE,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue