aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_asyncio/utils.py
diff options
context:
space:
mode:
authorKumar Aditya <kumaraditya@python.org>2024-06-23 09:53:23 +0530
committerGitHub <noreply@github.com>2024-06-23 09:53:23 +0530
commit96ead91f0f0db59a942b8b34da9cc980c05588a2 (patch)
tree6999459fac5b0203434f35498042bee6777157fe /Lib/test/test_asyncio/utils.py
parent4717aaa1a72d1964f1531a7c613f37ce3d9056d9 (diff)
downloadcpython-96ead91f0f0db59a942b8b34da9cc980c05588a2.tar.gz
cpython-96ead91f0f0db59a942b8b34da9cc980c05588a2.zip
GH-120804: Remove `get_child_watcher` and `set_child_watcher` from asyncio (#120818)
Diffstat (limited to 'Lib/test/test_asyncio/utils.py')
-rw-r--r--Lib/test/test_asyncio/utils.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/Lib/test/test_asyncio/utils.py b/Lib/test/test_asyncio/utils.py
index 44943e1fa7b..3fe2ecd2be6 100644
--- a/Lib/test/test_asyncio/utils.py
+++ b/Lib/test/test_asyncio/utils.py
@@ -550,10 +550,8 @@ class TestCase(unittest.TestCase):
policy = support.maybe_get_event_loop_policy()
if policy is not None:
try:
- with warnings.catch_warnings():
- warnings.simplefilter('ignore', DeprecationWarning)
- watcher = policy.get_child_watcher()
- except NotImplementedError:
+ watcher = policy._watcher
+ except AttributeError:
# watcher is not implemented by EventLoopPolicy, e.g. Windows
pass
else: