commit: 8d962cb5cc97a5092ff45446c0f8da55b27d2434 Author: Zac Medico <zmedico <AT> gentoo <DOT> org> AuthorDate: Mon Jan 18 10:09:05 2021 +0000 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> CommitDate: Mon Jan 18 11:18:43 2021 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=8d962cb5
coroutine: do not require loop parameter The loop parameter is not needed since global_event_loop now returns the running event loop for the current thread. Bug: https://bugs.gentoo.org/737698 Bug: https://bugs.gentoo.org/763339 Signed-off-by: Zac Medico <zmedico <AT> gentoo.org> lib/portage/util/futures/compat_coroutine.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/portage/util/futures/compat_coroutine.py b/lib/portage/util/futures/compat_coroutine.py index 9a0c5c1c8..3e8dcec02 100644 --- a/lib/portage/util/futures/compat_coroutine.py +++ b/lib/portage/util/futures/compat_coroutine.py @@ -1,4 +1,4 @@ -# Copyright 2018 Gentoo Foundation +# Copyright 2018-2021 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 import functools @@ -68,10 +68,6 @@ def _generator_future(generator_func, *args, **kwargs): the default event loop. """ loop = kwargs.get('loop') - if loop is None and portage._internal_caller: - # Require an explicit loop parameter, in order to support - # local event loops (bug 737698). - raise AssertionError("Missing required argument 'loop'") loop = asyncio._wrap_loop(loop) result = loop.create_future() _GeneratorTask(generator_func(*args, **kwargs), result, loop=loop)
