From: Zac Medico <zmedico@gentoo.org>
To: gentoo-portage-dev@lists.gentoo.org, Matt Turner <mattst88@gentoo.org>
Subject: Re: [gentoo-portage-dev] [PATCH] Use asyncio.subprocess.Process directly
Date: Sat, 6 Mar 2021 01:40:17 -0800 [thread overview]
Message-ID: <796589c8-dc82-30ea-7501-5c97b06d2e3f@gentoo.org> (raw)
In-Reply-To: <20210304192458.899911-1-mattst88@gentoo.org>
[-- Attachment #1.1: Type: text/plain, Size: 1609 bytes --]
On 3/4/21 11:24 AM, Matt Turner wrote:
> With no need to support Python 2, we can remove our private
> implementation.
>
> Signed-off-by: Matt Turner <mattst88@gentoo.org>
> ---
> I don't know how to test this. I intentionally broke the return value of
> create_subprocess_exec and didn't see any bad results.
>
> lib/portage/util/futures/_asyncio/__init__.py | 8 +-
> lib/portage/util/futures/_asyncio/process.py | 116 ------------------
> 2 files changed, 4 insertions(+), 120 deletions(-)
> delete mode 100644 lib/portage/util/futures/_asyncio/process.py
Merged, thanks!
https://gitweb.gentoo.org/proj/portage.git/commit/?id=1e843f853a9afe82d599e6ab09064147ddc1d271
> diff --git a/lib/portage/util/futures/_asyncio/__init__.py b/lib/portage/util/futures/_asyncio/__init__.py
> index 5590963f1..207e7205d 100644
> --- a/lib/portage/util/futures/_asyncio/__init__.py
> +++ b/lib/portage/util/futures/_asyncio/__init__.py
> @@ -25,6 +25,7 @@ import types
> import weakref
>
> import asyncio as _real_asyncio
> +from asyncio.subprocess import Process
>
> try:
> import threading
> @@ -138,7 +138,7 @@ def create_subprocess_exec(*args, **kwargs):
>
> result = loop.create_future()
>
> - result.set_result(_Process(subprocess.Popen(
> + result.set_result(Process(subprocess.Popen(
> args,
> stdin=kwargs.pop('stdin', None),
> stdout=kwargs.pop('stdout', None),
The above area is actually no longer used, since we should always have a
_AsyncioEventLoop instance here, and we can remove the EventLoop class now.
--
Thanks,
Zac
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 981 bytes --]
prev parent reply other threads:[~2021-03-06 9:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-04 19:24 [gentoo-portage-dev] [PATCH] Use asyncio.subprocess.Process directly Matt Turner
2021-03-06 9:40 ` Zac Medico [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=796589c8-dc82-30ea-7501-5c97b06d2e3f@gentoo.org \
--to=zmedico@gentoo.org \
--cc=gentoo-portage-dev@lists.gentoo.org \
--cc=mattst88@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox