diff options
author | Kumar Aditya <kumaraditya@python.org> | 2024-06-21 04:53:10 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-21 04:53:10 (GMT) |
commit | 733dac01b0dc3047efc9027dba177d7116e47c50 (patch) | |
tree | 37c9cff3e1a204b8e1d93887594109afe768d059 /Lib/test/test_asyncio/test_subprocess.py | |
parent | a2f6f7dd26128b834c6e66fe1ceac3ac751143f5 (diff) | |
download | cpython-733dac01b0dc3047efc9027dba177d7116e47c50.zip cpython-733dac01b0dc3047efc9027dba177d7116e47c50.tar.gz cpython-733dac01b0dc3047efc9027dba177d7116e47c50.tar.bz2 |
GH-120804: Remove SafeChildWatcher, FastChildWatcher and MultiLoopChildWatcher from asyncio (#120805)
Remove SafeChildWatcher, FastChildWatcher and MultiLoopChildWatcher from asyncio. These child watchers have been deprecated since Python 3.12. The tests are also removed and some more tests will be added after the rewrite of child watchers.
Diffstat (limited to 'Lib/test/test_asyncio/test_subprocess.py')
-rw-r--r-- | Lib/test/test_asyncio/test_subprocess.py | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/Lib/test/test_asyncio/test_subprocess.py b/Lib/test/test_asyncio/test_subprocess.py index cf1a198..27ae766 100644 --- a/Lib/test/test_asyncio/test_subprocess.py +++ b/Lib/test/test_asyncio/test_subprocess.py @@ -631,15 +631,6 @@ class SubprocessMixin: # the transport was not notified yet self.assertFalse(killed) - # Unlike SafeChildWatcher, FastChildWatcher does not pop the - # callbacks if waitpid() is called elsewhere. Let's clear them - # manually to avoid a warning when the watcher is detached. - if (sys.platform != 'win32' and - isinstance(self, SubprocessFastWatcherTests)): - with warnings.catch_warnings(): - warnings.simplefilter('ignore', DeprecationWarning) - asyncio.get_child_watcher()._callbacks.clear() - async def _test_popen_error(self, stdin): if sys.platform == 'win32': target = 'asyncio.windows_utils.Popen' @@ -908,26 +899,6 @@ if sys.platform != 'win32': def _get_watcher(self): return unix_events.ThreadedChildWatcher() - class SubprocessSafeWatcherTests(SubprocessWatcherMixin, - test_utils.TestCase): - - def _get_watcher(self): - with self.assertWarns(DeprecationWarning): - return unix_events.SafeChildWatcher() - - class MultiLoopChildWatcherTests(test_utils.TestCase): - - def test_warns(self): - with self.assertWarns(DeprecationWarning): - unix_events.MultiLoopChildWatcher() - - class SubprocessFastWatcherTests(SubprocessWatcherMixin, - test_utils.TestCase): - - def _get_watcher(self): - with self.assertWarns(DeprecationWarning): - return unix_events.FastChildWatcher() - @unittest.skipUnless( unix_events.can_use_pidfd(), "operating system does not support pidfds", |