Since python3.7, the asyncio.get_running_loop() and asyncio.run(coro) functions are the preferred ways to access and run event loops. The asyncio.get_running_loop() function makes it possible to avoid passing around event loop instances in order to accommodate loops running in non-main threads (see the fix for bug 737698). For python3.6 compatibility, we can add shims for these functions in the portage.util.futures.asyncio module.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=631bedffe29124d693de3b539fc908d9feec1420 commit 631bedffe29124d693de3b539fc908d9feec1420 Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2021-09-19 22:05:38 -0700 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2021-09-19 22:08:47 -0700 _safe_loop: fix python3.10 DeprecationWarning DeprecationWarning: There is no current event loop Signed-off-by: Zac Medico <zmedico@gentoo.org> lib/portage/util/futures/_asyncio/__init__.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)