aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_asyncio/test_events.py
diff options
context:
space:
mode:
authorKumar Aditya <59607654+kumaraditya303@users.noreply.github.com>2022-10-09 02:22:19 +0530
committerGitHub <noreply@github.com>2022-10-08 13:52:19 -0700
commitd8765284f33ec221b5fe07b439ca2dc2d648251d (patch)
treea0535fa12e331f73f9a1759581cafb05e75d37f3 /Lib/test/test_asyncio/test_events.py
parent75751f4aa5d70f65856645a9128fd42d92d6692c (diff)
downloadcpython-d8765284f33ec221b5fe07b439ca2dc2d648251d.tar.gz
cpython-d8765284f33ec221b5fe07b439ca2dc2d648251d.zip
GH-94597: deprecate `SafeChildWatcher`, `FastChildWatcher` and `MultiLoopChildWatcher` child watchers (#98089)
Diffstat (limited to 'Lib/test/test_asyncio/test_events.py')
-rw-r--r--Lib/test/test_asyncio/test_events.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/Lib/test/test_asyncio/test_events.py b/Lib/test/test_asyncio/test_events.py
index 80d7152128c..98b55dec37f 100644
--- a/Lib/test/test_asyncio/test_events.py
+++ b/Lib/test/test_asyncio/test_events.py
@@ -22,7 +22,7 @@ import errno
import unittest
from unittest import mock
import weakref
-
+import warnings
if sys.platform not in ('win32', 'vxworks'):
import tty
@@ -2055,7 +2055,9 @@ else:
class UnixEventLoopTestsMixin(EventLoopTestsMixin):
def setUp(self):
super().setUp()
- watcher = asyncio.SafeChildWatcher()
+ with warnings.catch_warnings():
+ warnings.simplefilter('ignore', DeprecationWarning)
+ watcher = asyncio.SafeChildWatcher()
watcher.attach_loop(self.loop)
asyncio.set_child_watcher(watcher)
@@ -2652,7 +2654,9 @@ class GetEventLoopTestsMixin:
asyncio.set_event_loop(self.loop)
if sys.platform != 'win32':
- watcher = asyncio.SafeChildWatcher()
+ with warnings.catch_warnings():
+ warnings.simplefilter('ignore', DeprecationWarning)
+ watcher = asyncio.SafeChildWatcher()
watcher.attach_loop(self.loop)
asyncio.set_child_watcher(watcher)