1 |
On 3/4/21 11:24 AM, Matt Turner wrote: |
2 |
> With no need to support Python 2, we can remove our private |
3 |
> implementation. |
4 |
> |
5 |
> Signed-off-by: Matt Turner <mattst88@g.o> |
6 |
> --- |
7 |
> I don't know how to test this. I intentionally broke the return value of |
8 |
> create_subprocess_exec and didn't see any bad results. |
9 |
> |
10 |
> lib/portage/util/futures/_asyncio/__init__.py | 8 +- |
11 |
> lib/portage/util/futures/_asyncio/process.py | 116 ------------------ |
12 |
> 2 files changed, 4 insertions(+), 120 deletions(-) |
13 |
> delete mode 100644 lib/portage/util/futures/_asyncio/process.py |
14 |
|
15 |
Merged, thanks! |
16 |
|
17 |
https://gitweb.gentoo.org/proj/portage.git/commit/?id=1e843f853a9afe82d599e6ab09064147ddc1d271 |
18 |
|
19 |
|
20 |
> diff --git a/lib/portage/util/futures/_asyncio/__init__.py b/lib/portage/util/futures/_asyncio/__init__.py |
21 |
> index 5590963f1..207e7205d 100644 |
22 |
> --- a/lib/portage/util/futures/_asyncio/__init__.py |
23 |
> +++ b/lib/portage/util/futures/_asyncio/__init__.py |
24 |
> @@ -25,6 +25,7 @@ import types |
25 |
> import weakref |
26 |
> |
27 |
> import asyncio as _real_asyncio |
28 |
> +from asyncio.subprocess import Process |
29 |
> |
30 |
> try: |
31 |
> import threading |
32 |
> @@ -138,7 +138,7 @@ def create_subprocess_exec(*args, **kwargs): |
33 |
> |
34 |
> result = loop.create_future() |
35 |
> |
36 |
> - result.set_result(_Process(subprocess.Popen( |
37 |
> + result.set_result(Process(subprocess.Popen( |
38 |
> args, |
39 |
> stdin=kwargs.pop('stdin', None), |
40 |
> stdout=kwargs.pop('stdout', None), |
41 |
|
42 |
The above area is actually no longer used, since we should always have a |
43 |
_AsyncioEventLoop instance here, and we can remove the EventLoop class now. |
44 |
-- |
45 |
Thanks, |
46 |
Zac |