commit: 67e0bba35f1b7afd5ee5ca648154838741875d6a Author: Zac Medico <zmedico <AT> gentoo <DOT> org> AuthorDate: Fri Oct 18 03:35:46 2019 +0000 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> CommitDate: Fri Oct 18 03:37:40 2019 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=67e0bba3
asyncio.create_subprocess_exec: suppress DeprecationWarning for loop argument See: https://bugs.python.org/issue36373 Signed-off-by: Zac Medico <zmedico <AT> gentoo.org> lib/portage/util/futures/_asyncio/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/portage/util/futures/_asyncio/__init__.py b/lib/portage/util/futures/_asyncio/__init__.py index bd9f2e47c..7635dbb5e 100644 --- a/lib/portage/util/futures/_asyncio/__init__.py +++ b/lib/portage/util/futures/_asyncio/__init__.py @@ -140,8 +140,9 @@ def create_subprocess_exec(*args, **kwargs): loop = _wrap_loop(kwargs.pop('loop', None)) kwargs.setdefault('close_fds', _close_fds_default) if _asyncio_enabled and isinstance(loop, _AsyncioEventLoop): - # Use the real asyncio loop and create_subprocess_exec. - return _real_asyncio.create_subprocess_exec(*args, loop=loop._loop, **kwargs) + # Use the real asyncio create_subprocess_exec (loop argument + # is deprecated since since Python 3.8). + return _real_asyncio.create_subprocess_exec(*args, **kwargs) result = loop.create_future()
