mirror of
https://github.com/python/cpython.git
synced 2025-12-09 18:48:05 +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
|
|
@ -48,12 +48,11 @@ you - by calling your self.found_terminator() method.
|
|||
import asyncore
|
||||
from collections import deque
|
||||
|
||||
from warnings import warn
|
||||
warn(
|
||||
'The asynchat module is deprecated and will be removed in Python 3.12. '
|
||||
'The recommended replacement is asyncio',
|
||||
DeprecationWarning,
|
||||
stacklevel=2)
|
||||
from warnings import _deprecated
|
||||
|
||||
_DEPRECATION_MSG = ('The {name} module is deprecated and will be removed in '
|
||||
'Python {remove}. The recommended replacement is asyncio')
|
||||
_deprecated(__name__, _DEPRECATION_MSG, remove=(3, 12))
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue