The asyncio.create_subprocess_exec function is essential for using subprocesses in coroutines, so add support to do this for python2. This paves the way for extensive use of coroutines in portage, since coroutines are well-suited for many portage tasks that involve subprocesses. I'll be posting a patch soon.
Patch posted for review: https://archives.gentoo.org/gentoo-portage-dev/message/cdb85f448b0d0ab57b7ee8879e001cce https://github.com/gentoo/portage/pull/346
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=6b4252d3a0f12808a5bcce888b7f68e1f84b5301 commit 6b4252d3a0f12808a5bcce888b7f68e1f84b5301 Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2018-07-28 21:22:42 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2018-08-06 04:38:41 +0000 Add asyncio.create_subprocess_exec support for python2 (bug 662388) The asyncio.create_subprocess_exec function is essential for using subprocesses in coroutines, so add support to do this for python2. This paves the way for extensive use of coroutines in portage, since coroutines are well-suited for many portage tasks that involve subprocesses. Bug: https://bugs.gentoo.org/662388 .../util/futures/asyncio/test_subprocess_exec.py | 184 ++++++--------------- lib/portage/util/futures/_asyncio/__init__.py | 53 ++++++ lib/portage/util/futures/_asyncio/process.py | 107 ++++++++++++ lib/portage/util/futures/_asyncio/streams.py | 96 +++++++++++ lib/portage/util/futures/compat_coroutine.py | 6 +- 5 files changed, 315 insertions(+), 131 deletions(-)