diff options
author | Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> | 2022-10-15 23:09:30 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-15 23:09:30 (GMT) |
commit | 660f10248ba321e7783c07f3801991275e2aee1e (patch) | |
tree | 7c1c2ba0839fc2e653117e1d26af7810f3e28cdc /Doc/library/asyncio-policy.rst | |
parent | bb56dead336357153a0c3b8cc9d9d6856d2c5a03 (diff) | |
download | cpython-660f10248ba321e7783c07f3801991275e2aee1e.zip cpython-660f10248ba321e7783c07f3801991275e2aee1e.tar.gz cpython-660f10248ba321e7783c07f3801991275e2aee1e.tar.bz2 |
GH-94597: Deprecate child watcher getters and setters (#98215)
This is the next step for deprecating child watchers.
Until we've removed the API completely we have to use it, so this PR is mostly suppressing a lot of warnings when using the API internally.
Once the child watcher API is totally removed, the two child watcher implementations we actually use and need (Pidfd and Thread) will be turned into internal helpers.
Diffstat (limited to 'Doc/library/asyncio-policy.rst')
-rw-r--r-- | Doc/library/asyncio-policy.rst | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Doc/library/asyncio-policy.rst b/Doc/library/asyncio-policy.rst index bfc3e30..052378e 100644 --- a/Doc/library/asyncio-policy.rst +++ b/Doc/library/asyncio-policy.rst @@ -88,12 +88,16 @@ The abstract event loop policy base class is defined as follows: This function is Unix specific. + .. deprecated:: 3.12 + .. method:: set_child_watcher(watcher) Set the current child process watcher to *watcher*. This function is Unix specific. + .. deprecated:: 3.12 + .. _asyncio-policy-builtin: @@ -158,12 +162,16 @@ implementation used by the asyncio event loop: Return the current child watcher for the current policy. + .. deprecated:: 3.12 + .. function:: set_child_watcher(watcher) Set the current child watcher to *watcher* for the current policy. *watcher* must implement methods defined in the :class:`AbstractChildWatcher` base class. + .. deprecated:: 3.12 + .. note:: Third-party event loops implementations might not support custom child watchers. For such event loops, using @@ -245,6 +253,8 @@ implementation used by the asyncio event loop: .. versionadded:: 3.8 + .. deprecated:: 3.12 + .. class:: SafeChildWatcher This implementation uses active event loop from the main thread to handle @@ -257,6 +267,8 @@ implementation used by the asyncio event loop: This solution is as safe as :class:`MultiLoopChildWatcher` and has the same *O(N)* complexity but requires a running event loop in the main thread to work. + .. deprecated:: 3.12 + .. class:: FastChildWatcher This implementation reaps every terminated processes by calling @@ -269,6 +281,8 @@ implementation used by the asyncio event loop: This solution requires a running event loop in the main thread to work, as :class:`SafeChildWatcher`. + .. deprecated:: 3.12 + .. class:: PidfdChildWatcher This implementation polls process file descriptors (pidfds) to await child |