mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
GH-94597: deprecate SafeChildWatcher
, FastChildWatcher
and MultiLoopChildWatcher
child watchers (#98089)
This commit is contained in:
parent
75751f4aa5
commit
d8765284f3
7 changed files with 81 additions and 38 deletions
|
@ -1022,6 +1022,13 @@ class SafeChildWatcher(BaseChildWatcher):
|
|||
big number of children (O(n) each time SIGCHLD is raised)
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
warnings._deprecated("SafeChildWatcher",
|
||||
"{name!r} is deprecated as of Python 3.12 and will be "
|
||||
"removed in Python {remove}.",
|
||||
remove=(3, 14))
|
||||
|
||||
def close(self):
|
||||
self._callbacks.clear()
|
||||
super().close()
|
||||
|
@ -1100,6 +1107,10 @@ class FastChildWatcher(BaseChildWatcher):
|
|||
self._lock = threading.Lock()
|
||||
self._zombies = {}
|
||||
self._forks = 0
|
||||
warnings._deprecated("FastChildWatcher",
|
||||
"{name!r} is deprecated as of Python 3.12 and will be "
|
||||
"removed in Python {remove}.",
|
||||
remove=(3, 14))
|
||||
|
||||
def close(self):
|
||||
self._callbacks.clear()
|
||||
|
@ -1212,6 +1223,10 @@ class MultiLoopChildWatcher(AbstractChildWatcher):
|
|||
def __init__(self):
|
||||
self._callbacks = {}
|
||||
self._saved_sighandler = None
|
||||
warnings._deprecated("MultiLoopChildWatcher",
|
||||
"{name!r} is deprecated as of Python 3.12 and will be "
|
||||
"removed in Python {remove}.",
|
||||
remove=(3, 14))
|
||||
|
||||
def is_active(self):
|
||||
return self._saved_sighandler is not None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue