summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/unix_events.py
diff options
context:
space:
mode:
authorKumar Aditya <59607654+kumaraditya303@users.noreply.github.com>2022-10-08 20:52:19 (GMT)
committerGitHub <noreply@github.com>2022-10-08 20:52:19 (GMT)
commitd8765284f33ec221b5fe07b439ca2dc2d648251d (patch)
treea0535fa12e331f73f9a1759581cafb05e75d37f3 /Lib/asyncio/unix_events.py
parent75751f4aa5d70f65856645a9128fd42d92d6692c (diff)
downloadcpython-d8765284f33ec221b5fe07b439ca2dc2d648251d.zip
cpython-d8765284f33ec221b5fe07b439ca2dc2d648251d.tar.gz
cpython-d8765284f33ec221b5fe07b439ca2dc2d648251d.tar.bz2
GH-94597: deprecate `SafeChildWatcher`, `FastChildWatcher` and `MultiLoopChildWatcher` child watchers (#98089)
Diffstat (limited to 'Lib/asyncio/unix_events.py')
-rw-r--r--Lib/asyncio/unix_events.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/Lib/asyncio/unix_events.py b/Lib/asyncio/unix_events.py
index 7fc75cd..bdffc03 100644
--- a/Lib/asyncio/unix_events.py
+++ b/Lib/asyncio/unix_events.py
@@ -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