From: "Zac Medico" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:master commit in: lib/portage/tests/emerge/
Date: Mon, 18 Jan 2021 12:20:17 +0000 (UTC) [thread overview]
Message-ID: <1610970198.05555e4c062e9dc87ce290e29816df9d8871f25b.zmedico@gentoo> (raw)
commit: 05555e4c062e9dc87ce290e29816df9d8871f25b
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 18 11:42:30 2021 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Jan 18 11:43:18 2021 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=05555e4c
SimpleEmergeTestCase: Use async and await syntax
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>
lib/portage/tests/emerge/test_simple.py | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/lib/portage/tests/emerge/test_simple.py b/lib/portage/tests/emerge/test_simple.py
index 1638fcb66..d26146aa9 100644
--- a/lib/portage/tests/emerge/test_simple.py
+++ b/lib/portage/tests/emerge/test_simple.py
@@ -1,4 +1,4 @@
-# Copyright 2011-2020 Gentoo Authors
+# Copyright 2011-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
import subprocess
@@ -14,7 +14,6 @@ from portage.tests.util.test_socks5 import AsyncHTTPServer
from portage.util import (ensure_dirs, find_updated_config_files,
shlex_split)
from portage.util.futures import asyncio
-from portage.util.futures.compat_coroutine import coroutine
class BinhostContentMap(Mapping):
@@ -225,8 +224,7 @@ call_has_and_best_version() {
loop.run_until_complete(asyncio.ensure_future(
self._async_test_simple(playground, metadata_xml_files, loop=loop), loop=loop))
- @coroutine
- def _async_test_simple(self, playground, metadata_xml_files, loop=None):
+ async def _async_test_simple(self, playground, metadata_xml_files, loop):
debug = playground.debug
settings = playground.settings
@@ -548,14 +546,14 @@ move dev-util/git dev-vcs/git
else:
local_env = env
- proc = yield asyncio.create_subprocess_exec(*args,
- env=local_env, stderr=None, stdout=stdout, loop=loop)
+ proc = await asyncio.create_subprocess_exec(*args,
+ env=local_env, stderr=None, stdout=stdout)
if debug:
- yield proc.wait()
+ await proc.wait()
else:
- output, _err = yield proc.communicate()
- yield proc.wait()
+ output, _err = await proc.communicate()
+ await proc.wait()
if proc.returncode != os.EX_OK:
portage.writemsg(output)
next reply other threads:[~2021-01-18 12:20 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-18 12:20 Zac Medico [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-02-25 8:25 [gentoo-commits] proj/portage:master commit in: lib/portage/tests/emerge/ Sam James
2024-02-24 3:36 Zac Medico
2024-01-03 19:59 Sam James
2023-10-30 3:14 Sam James
2023-10-30 3:14 Sam James
2023-10-30 3:14 Sam James
2023-10-30 3:14 Sam James
2023-10-30 3:14 Sam James
2023-10-30 3:14 Sam James
2023-10-30 3:14 Sam James
2023-10-30 3:14 Sam James
2023-10-30 3:14 Sam James
2023-10-30 3:14 Sam James
2023-10-30 3:14 Sam James
2023-10-30 3:14 Sam James
2023-10-30 3:14 Sam James
2023-10-30 3:14 Sam James
2023-10-30 3:14 Sam James
2023-10-30 3:14 Sam James
2023-10-30 3:14 Sam James
2023-10-30 3:14 Sam James
2023-10-30 3:14 Sam James
2023-10-30 3:14 Sam James
2023-10-30 3:14 Sam James
2023-10-30 3:14 Sam James
2023-10-30 3:14 Sam James
2023-10-30 3:14 Sam James
2023-10-30 3:14 Sam James
2023-05-26 15:45 Sam James
2023-05-26 15:45 Sam James
2022-09-25 19:12 Mike Gilbert
2020-10-17 9:21 Zac Medico
2020-10-12 18:03 Zac Medico
2020-08-03 23:28 Zac Medico
2020-08-03 19:30 Zac Medico
2020-03-08 22:29 Zac Medico
2020-03-08 7:33 Zac Medico
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=1610970198.05555e4c062e9dc87ce290e29816df9d8871f25b.zmedico@gentoo \
--to=zmedico@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.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