GH-120804: Remove get_child_watcher and set_child_watcher from asyncio (#120818)

This commit is contained in:
Kumar Aditya 2024-06-23 09:53:23 +05:30 committed by GitHub
parent 4717aaa1a7
commit 96ead91f0f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 18 additions and 227 deletions

View file

@ -10,7 +10,6 @@ __all__ = (
'Handle', 'TimerHandle',
'get_event_loop_policy', 'set_event_loop_policy',
'get_event_loop', 'set_event_loop', 'new_event_loop',
'get_child_watcher', 'set_child_watcher',
'_set_running_loop', 'get_running_loop',
'_get_running_loop',
)
@ -652,17 +651,6 @@ class AbstractEventLoopPolicy:
the current context, set_event_loop must be called explicitly."""
raise NotImplementedError
# Child processes handling (Unix only).
def get_child_watcher(self):
"Get the watcher for child processes."
raise NotImplementedError
def set_child_watcher(self, watcher):
"""Set the watcher for child processes."""
raise NotImplementedError
class BaseDefaultEventLoopPolicy(AbstractEventLoopPolicy):
"""Default policy implementation for accessing the event loop.
@ -837,17 +825,6 @@ def new_event_loop():
return get_event_loop_policy().new_event_loop()
def get_child_watcher():
"""Equivalent to calling get_event_loop_policy().get_child_watcher()."""
return get_event_loop_policy().get_child_watcher()
def set_child_watcher(watcher):
"""Equivalent to calling
get_event_loop_policy().set_child_watcher(watcher)."""
return get_event_loop_policy().set_child_watcher(watcher)
# Alias pure-Python implementations for testing purposes.
_py__get_running_loop = _get_running_loop
_py__set_running_loop = _set_running_loop