commit: 34e4d5655360d135dbf2cd3a073d07d96e23cf74
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 26 05:09:53 2023 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Sep 26 05:14:21 2023 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=34e4d565
Remove deprecated AbstractChildWatcher usage
Fixes this DeprecationWarning triggered by
lib/portage/tests/util/futures/asyncio/test_event_loop_in_fork.py:
lib/portage/util/_eventloop/asyncio_event_loop.py:138: DeprecationWarning:
'AbstractChildWatcher' is deprecated as of Python 3.12 and will be removed in
Python 3.14.
class _ChildWatcherThreadSafetyWrapper(_AbstractChildWatcher):
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>
lib/portage/util/_eventloop/asyncio_event_loop.py | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/lib/portage/util/_eventloop/asyncio_event_loop.py
b/lib/portage/util/_eventloop/asyncio_event_loop.py
index 88933af9d2..37b5b2706c 100644
--- a/lib/portage/util/_eventloop/asyncio_event_loop.py
+++ b/lib/portage/util/_eventloop/asyncio_event_loop.py
@@ -1,4 +1,4 @@
-# Copyright 2018-2021 Gentoo Authors
+# Copyright 2018-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
import os
@@ -6,7 +6,6 @@ import signal
import asyncio as _real_asyncio
from asyncio.events import AbstractEventLoop as _AbstractEventLoop
-from asyncio.unix_events import AbstractChildWatcher as _AbstractChildWatcher
import portage
@@ -135,7 +134,7 @@ class AsyncioEventLoop(_AbstractEventLoop):
pass
-class _ChildWatcherThreadSafetyWrapper(_AbstractChildWatcher):
+class _ChildWatcherThreadSafetyWrapper:
def __init__(self, loop, real_watcher):
self._loop = loop
self._real_watcher = real_watcher