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