aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_asyncio/test_streams.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_streams.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_streams.py')
-rw-r--r--Lib/test/test_asyncio/test_streams.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/test_asyncio/test_streams.py b/Lib/test/test_asyncio/test_streams.py
index 0c49099bc49..8fb9313e09d 100644
--- a/Lib/test/test_asyncio/test_streams.py
+++ b/Lib/test/test_asyncio/test_streams.py
@@ -9,6 +9,7 @@ import sys
import threading
import unittest
from unittest import mock
+import warnings
from test.support import socket_helper
try:
import ssl
@@ -791,8 +792,9 @@ os.close(fd)
protocol = asyncio.StreamReaderProtocol(reader, loop=self.loop)
transport, _ = self.loop.run_until_complete(
self.loop.connect_read_pipe(lambda: protocol, pipe))
-
- watcher = asyncio.SafeChildWatcher()
+ with warnings.catch_warnings():
+ warnings.simplefilter('ignore', DeprecationWarning)
+ watcher = asyncio.SafeChildWatcher()
watcher.attach_loop(self.loop)
try:
asyncio.set_child_watcher(watcher)