mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
GH-94597: add deprecation warnings for subclassing AbstractChildWatcher
(#99386)
This commit is contained in:
parent
e02cc6d42a
commit
aa874326d8
5 changed files with 21 additions and 3 deletions
|
@ -846,6 +846,13 @@ class AbstractChildWatcher:
|
|||
waitpid(-1), there should be only one active object per process.
|
||||
"""
|
||||
|
||||
def __init_subclass__(cls) -> None:
|
||||
if cls.__module__ != __name__:
|
||||
warnings._deprecated("AbstractChildWatcher",
|
||||
"{name!r} is deprecated as of Python 3.12 and will be "
|
||||
"removed in Python {remove}.",
|
||||
remove=(3, 14))
|
||||
|
||||
def add_child_handler(self, pid, callback, *args):
|
||||
"""Register a new child handler.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue