mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +00:00
GH-94597: deprecate SafeChildWatcher
, FastChildWatcher
and MultiLoopChildWatcher
child watchers (#98089)
This commit is contained in:
parent
75751f4aa5
commit
d8765284f3
7 changed files with 81 additions and 38 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue