diff options
author | Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> | 2022-10-09 02:22:19 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-08 13:52:19 -0700 |
commit | d8765284f33ec221b5fe07b439ca2dc2d648251d (patch) | |
tree | a0535fa12e331f73f9a1759581cafb05e75d37f3 /Lib/test/test_asyncio/test_events.py | |
parent | 75751f4aa5d70f65856645a9128fd42d92d6692c (diff) | |
download | cpython-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.py | 10 |
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) |