diff options
Diffstat (limited to 'Lib/asyncore.py')
-rw-r--r-- | Lib/asyncore.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Lib/asyncore.py b/Lib/asyncore.py index a360d40..57c8687 100644 --- a/Lib/asyncore.py +++ b/Lib/asyncore.py @@ -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, |