From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 47FDC158012 for ; Tue, 21 Sep 2021 05:51:57 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 983E2E08BD; Tue, 21 Sep 2021 05:51:56 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7DC5AE08BD for ; Tue, 21 Sep 2021 05:51:56 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 62DA6342F34 for ; Tue, 21 Sep 2021 05:51:55 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7AB3D107 for ; Tue, 21 Sep 2021 05:51:52 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1632202431.95935004862d1363a0e3d5b6ee33d4ed65566a2d.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: lib/portage/dbapi/ X-VCS-Repository: proj/portage X-VCS-Files: lib/portage/dbapi/porttree.py X-VCS-Directories: lib/portage/dbapi/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 95935004862d1363a0e3d5b6ee33d4ed65566a2d X-VCS-Branch: master Date: Tue, 21 Sep 2021 05:51:52 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 67c72f5b-405b-42ba-b076-b6e2bd2de5bc X-Archives-Hash: 9ee483430f55f30a27adc677dce0db6a commit: 95935004862d1363a0e3d5b6ee33d4ed65566a2d Author: Zac Medico gentoo org> AuthorDate: Tue Sep 21 05:13:12 2021 +0000 Commit: Zac Medico gentoo org> CommitDate: Tue Sep 21 05:33:51 2021 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=95935004 portdbapi: convert compat coroutine to async Signed-off-by: Zac Medico gentoo.org> lib/portage/dbapi/porttree.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/portage/dbapi/porttree.py b/lib/portage/dbapi/porttree.py index 72b875879..93f3fee2f 100644 --- a/lib/portage/dbapi/porttree.py +++ b/lib/portage/dbapi/porttree.py @@ -38,7 +38,6 @@ from portage import os from portage import _encodings from portage import _unicode_encode from portage.util.futures import asyncio -from portage.util.futures.compat_coroutine import coroutine, coroutine_return from portage.util.futures.iter_completed import iter_gather from _emerge.EbuildMetadataPhase import EbuildMetadataPhase @@ -1244,8 +1243,7 @@ class portdbapi(dbapi): loop = self._event_loop return loop.run_until_complete(self.async_xmatch(level, origdep, loop=loop)) - @coroutine - def async_xmatch(self, level, origdep, loop=None): + async def async_xmatch(self, level, origdep, loop=None): """ Asynchronous form of xmatch. @@ -1269,7 +1267,7 @@ class portdbapi(dbapi): if self.frozen: cache_key = (mydep, mydep.unevaluated_atom) try: - coroutine_return(self.xcache[level][cache_key][:]) + return self.xcache[level][cache_key][:] except KeyError: pass @@ -1336,7 +1334,7 @@ class portdbapi(dbapi): zip( aux_keys, ( - yield self.async_aux_get( + await self.async_aux_get( cpv, aux_keys, myrepo=cpv.repo, loop=loop ) ), @@ -1384,7 +1382,7 @@ class portdbapi(dbapi): if not isinstance(myval, _pkg_str): myval = myval[:] - coroutine_return(myval) + return myval def match(self, mydep, use_cache=1): return self.xmatch("match-visible", mydep)