From nobody Fri May 3 21:12:45 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1642810483586373.3620705168663; Fri, 21 Jan 2022 16:14:43 -0800 (PST) Received: from localhost ([::1]:59000 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nB43G-0003I6-Cm for importer@patchew.org; Fri, 21 Jan 2022 19:14:42 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38948) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nB3ya-0000Ks-I4 for qemu-devel@nongnu.org; Fri, 21 Jan 2022 19:09:52 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:26746) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nB3yW-0005At-GL for qemu-devel@nongnu.org; Fri, 21 Jan 2022 19:09:52 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-130-Dxnq4Fp2OPGPeqgnCSEZeg-1; Fri, 21 Jan 2022 19:09:42 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 47452807907; Sat, 22 Jan 2022 00:09:41 +0000 (UTC) Received: from scv.redhat.com (unknown [10.22.19.60]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7174266E1B; Sat, 22 Jan 2022 00:09:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1642810187; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rr4rDjBadgBcz9wR0rV1Q8VVt3wP3dLw7J4Zgs8eT+M=; b=Vzb5gU4MthQhrsSaDO4uGDOrlMvAJjXjF/gJcROoCzC3MVXXpuy90o4BG3ktIrRX0GwzkD x8EwS3Bg3BFsUnSw0kkUpO+VYsSfGhJorukoqX46AZHu3tHrSb0GM1rYupN6Mz9wIyAvUI 8Wjroa1IbRPVmPLmBcxsL5AId2louok= X-MC-Unique: Dxnq4Fp2OPGPeqgnCSEZeg-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PULL 01/17] python: pin setuptools below v60.0.0 Date: Fri, 21 Jan 2022 19:09:15 -0500 Message-Id: <20220122000931.536322-2-jsnow@redhat.com> In-Reply-To: <20220122000931.536322-1-jsnow@redhat.com> References: <20220122000931.536322-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=jsnow@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.699, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , Peter Maydell , Beraldo Leal , Markus Armbruster , Cleber Rosa , John Snow Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1642810484789100001 Content-Type: text/plain; charset="utf-8" setuptools is a package that replaces the python stdlib 'distutils'. It is generally installed by all venv-creating tools "by default". It isn't actually needed at runtime for the qemu package, so our own setup.cfg does not mention it as a dependency. However, tox will create virtual environments that include it, and will upgrade it to the very latest version. the 'venv' tool will also include whichever version your host system happens to have. Unfortunately, setuptools version 60.0.0 and above include a hack to forcibly overwrite python's built-in distutils. The pylint tool that we use to run code analysis checks on this package relies on distutils and suffers regressions when setuptools >=3D 60.0.0 is present at all, see https://github.com/PyCQA/pylint/issues/5704 Instruct tox and the 'check-dev' targets to avoid setuptools packages that are too new, for now. Pipenv is unaffected, because setuptools 60 does not offer Python 3.6 support, and our pipenv config is pinned against Python 3.6. Signed-off-by: John Snow Reviewed-by: Beraldo Leal Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa Message-id: 20220121005221.142236-1-jsnow@redhat.com Signed-off-by: John Snow --- python/Makefile | 2 ++ python/setup.cfg | 1 + 2 files changed, 3 insertions(+) diff --git a/python/Makefile b/python/Makefile index 3334311362..949c472624 100644 --- a/python/Makefile +++ b/python/Makefile @@ -68,6 +68,8 @@ $(QEMU_VENV_DIR) $(QEMU_VENV_DIR)/bin/activate: setup.cfg echo "ACTIVATE $(QEMU_VENV_DIR)"; \ . $(QEMU_VENV_DIR)/bin/activate; \ echo "INSTALL qemu[devel] $(QEMU_VENV_DIR)"; \ + pip install --disable-pip-version-check \ + "setuptools<60.0.0" 1>/dev/null; \ make develop 1>/dev/null; \ ) @touch $(QEMU_VENV_DIR) diff --git a/python/setup.cfg b/python/setup.cfg index 417e937839..aa238d8bc9 100644 --- a/python/setup.cfg +++ b/python/setup.cfg @@ -163,6 +163,7 @@ deps =3D .[devel] .[fuse] # Workaround to trigger tox venv rebuild .[tui] # Workaround to trigger tox venv rebuild + setuptools < 60 # Workaround, please see commit msg. commands =3D make check =20 --=20 2.31.1 From nobody Fri May 3 21:12:45 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1642810473266887.5539803341906; Fri, 21 Jan 2022 16:14:33 -0800 (PST) Received: from localhost ([::1]:58798 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nB435-00039i-Ka for importer@patchew.org; Fri, 21 Jan 2022 19:14:31 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38918) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nB3yY-0000Hf-QT for qemu-devel@nongnu.org; Fri, 21 Jan 2022 19:09:50 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:38506) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nB3yW-0005Ak-1Q for qemu-devel@nongnu.org; Fri, 21 Jan 2022 19:09:50 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-150-I5nuQMDYPIme7XvZ36hP3A-1; Fri, 21 Jan 2022 19:09:43 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 41A39802924; Sat, 22 Jan 2022 00:09:42 +0000 (UTC) Received: from scv.redhat.com (unknown [10.22.19.60]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6DB1E66E1B; Sat, 22 Jan 2022 00:09:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1642810186; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+LZja7wr5Qp/mNqNqQrKIU/8qKvH3N52gynm1UFhqEM=; b=bXHOHejcnTNokU3LTfhGpqaVjn+biJFpi+q9NpPr5gKSjkOpjYX0GOrJAcVN5uWAWR8rdL b2EDNyXui1gFIuAO/K2MC/QgUU+qDPqKL+vvmVHycwJnwin3CXx+zyb4OhDc4JGXMnGU7p IQpM9AGLJLYQ8p4Icfo+5u/C6ETeD5Y= X-MC-Unique: I5nuQMDYPIme7XvZ36hP3A-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PULL 02/17] python: use avocado's "new" runner Date: Fri, 21 Jan 2022 19:09:16 -0500 Message-Id: <20220122000931.536322-3-jsnow@redhat.com> In-Reply-To: <20220122000931.536322-1-jsnow@redhat.com> References: <20220122000931.536322-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=jsnow@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.699, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , Peter Maydell , Beraldo Leal , Markus Armbruster , Cleber Rosa , John Snow Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1642810473911100001 Content-Type: text/plain; charset="utf-8" The old legacy runner no longer seems to work with output logging, so we can't see failure logs when a test case fails. The new runner doesn't (seem to) support Coverage.py yet, but seeing error output is a more important feature. Signed-off-by: John Snow Reviewed-by: Beraldo Leal Message-id: 20220119193916.4138217-3-jsnow@redhat.com Signed-off-by: John Snow --- python/avocado.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/avocado.cfg b/python/avocado.cfg index c7722e7ecd..a460420059 100644 --- a/python/avocado.cfg +++ b/python/avocado.cfg @@ -1,5 +1,5 @@ [run] -test_runner =3D runner +test_runner =3D nrunner =20 [simpletests] # Don't show stdout/stderr in the test *summary* --=20 2.31.1 From nobody Fri May 3 21:12:45 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 16428106425661017.0291820107683; Fri, 21 Jan 2022 16:17:22 -0800 (PST) Received: from localhost ([::1]:39068 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nB45p-0000aH-IC for importer@patchew.org; Fri, 21 Jan 2022 19:17:21 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38916) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nB3yZ-0000HX-Fw for qemu-devel@nongnu.org; Fri, 21 Jan 2022 19:09:51 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:51002) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nB3yV-0005Am-Ui for qemu-devel@nongnu.org; Fri, 21 Jan 2022 19:09:50 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-317-OGPvifbhNHaa-gDcycfMEA-1; Fri, 21 Jan 2022 19:09:44 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5ACEA1083F61; Sat, 22 Jan 2022 00:09:43 +0000 (UTC) Received: from scv.redhat.com (unknown [10.22.19.60]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6972D66E1B; Sat, 22 Jan 2022 00:09:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1642810186; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TqrUwrZCzAHjq29PwyfAh0VNX9QK4TDT66xeiit3jt4=; b=Kf7dsBaf1ODT4ahfbkDc6Fc0Fp4NwVPXwmF7c/aA+P7/0U9i4LKRMt+13ITRv6cLeFJYDi VOC/RwAaiq3rfL2bBA33PJpwM5df03iENeNvKxnJDzn0L45EX2bIrW3mnVqjtXuzyUD5lq nLGKHNu0NOdgOihmAtqFwS+I4Rh7GRU= X-MC-Unique: OGPvifbhNHaa-gDcycfMEA-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PULL 03/17] python/aqmp: fix docstring typo Date: Fri, 21 Jan 2022 19:09:17 -0500 Message-Id: <20220122000931.536322-4-jsnow@redhat.com> In-Reply-To: <20220122000931.536322-1-jsnow@redhat.com> References: <20220122000931.536322-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=jsnow@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.699, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , Peter Maydell , Vladimir Sementsov-Ogievskiy , Beraldo Leal , Markus Armbruster , Cleber Rosa , John Snow Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1642810644850100003 Content-Type: text/plain; charset="utf-8" Reported-by: Vladimir Sementsov-Ogievskiy Signed-off-by: John Snow Reviewed-by: Beraldo Leal --- python/qemu/aqmp/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/qemu/aqmp/__init__.py b/python/qemu/aqmp/__init__.py index 880d5b6fa7..173556404d 100644 --- a/python/qemu/aqmp/__init__.py +++ b/python/qemu/aqmp/__init__.py @@ -6,7 +6,7 @@ QEMU Guest Agent, and the QEMU Storage Daemon. =20 `QMPClient` provides the main functionality of this package. All errors -raised by this library dervive from `AQMPError`, see `aqmp.error` for +raised by this library derive from `AQMPError`, see `aqmp.error` for additional detail. See `aqmp.events` for an in-depth tutorial on managing QMP events. """ --=20 2.31.1 From nobody Fri May 3 21:12:45 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 164281049165368.09869103449842; Fri, 21 Jan 2022 16:14:51 -0800 (PST) Received: from localhost ([::1]:59058 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nB43M-0003Kn-QK for importer@patchew.org; Fri, 21 Jan 2022 19:14:49 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38950) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nB3ya-0000LL-MJ for qemu-devel@nongnu.org; Fri, 21 Jan 2022 19:09:52 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:26668) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nB3yY-0005B4-F0 for qemu-devel@nongnu.org; Fri, 21 Jan 2022 19:09:52 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-1-bKmPbn9WMO2jEJF9iskgCQ-1; Fri, 21 Jan 2022 19:09:46 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7D35E2F26; Sat, 22 Jan 2022 00:09:45 +0000 (UTC) Received: from scv.redhat.com (unknown [10.22.19.60]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8538A66E1B; Sat, 22 Jan 2022 00:09:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1642810189; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NuSwDqKg/bbUG6s3ZY2E9hTlUXu4rBc7DyGKnKTOigE=; b=hHEjCLsWzRE5W8MDNLRQaiQz8+nIwJPui4BPXSs42Ej+gVuaQjmR/9sNlKPpXYIcBVs7kV ZikVRnsGki/Q3bLI7LbXqxkGUHILFR5EYDS8ZtMS4Mnh3R9AbLSef/Qryx3xs1HU/zAhZS KFrVa/mxZ3SZC15rft0kfvhF1UAhyoQ= X-MC-Unique: bKmPbn9WMO2jEJF9iskgCQ-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PULL 04/17] python/aqmp: add __del__ method to legacy interface Date: Fri, 21 Jan 2022 19:09:18 -0500 Message-Id: <20220122000931.536322-5-jsnow@redhat.com> In-Reply-To: <20220122000931.536322-1-jsnow@redhat.com> References: <20220122000931.536322-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=jsnow@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.699, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , Peter Maydell , Vladimir Sementsov-Ogievskiy , Beraldo Leal , Markus Armbruster , Cleber Rosa , John Snow Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1642810494212100001 Content-Type: text/plain; charset="utf-8" asyncio can complain *very* loudly if you forget to back out of things gracefully before the garbage collector starts destroying objects that contain live references to asyncio Tasks. The usual fix is just to remember to call aqmp.disconnect(), but for the sake of the legacy wrapper and quick, one-off scripts where a graceful shutdown is not necessarily of paramount imporance, add a courtesy cleanup that will trigger prior to seeing screenfuls of confusing asyncio tracebacks. Note that we can't *always* save you from yourself; depending on when the GC runs, you might just seriously be out of luck. The best we can do in this case is to gently remind you to clean up after yourself. (Still much better than multiple pages of incomprehensible python warnings for the crime of forgetting to put your toys away.) Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Beraldo Leal --- python/qemu/aqmp/legacy.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/python/qemu/aqmp/legacy.py b/python/qemu/aqmp/legacy.py index 9e7b9fb80b..2ccb136b02 100644 --- a/python/qemu/aqmp/legacy.py +++ b/python/qemu/aqmp/legacy.py @@ -16,6 +16,8 @@ import qemu.qmp from qemu.qmp import QMPMessage, QMPReturnValue, SocketAddrT =20 +from .error import AQMPError +from .protocol import Runstate from .qmp_client import QMPClient =20 =20 @@ -136,3 +138,19 @@ def settimeout(self, timeout: Optional[float]) -> None: =20 def send_fd_scm(self, fd: int) -> None: self._aqmp.send_fd_scm(fd) + + def __del__(self) -> None: + if self._aqmp.runstate =3D=3D Runstate.IDLE: + return + + if not self._aloop.is_running(): + self.close() + else: + # Garbage collection ran while the event loop was running. + # Nothing we can do about it now, but if we don't raise our + # own error, the user will be treated to a lot of traceback + # they might not understand. + raise AQMPError( + "QEMUMonitorProtocol.close()" + " was not called before object was garbage collected" + ) --=20 2.31.1 From nobody Fri May 3 21:12:45 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1642810791398380.01829805624266; Fri, 21 Jan 2022 16:19:51 -0800 (PST) Received: from localhost ([::1]:47430 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nB48D-0006GI-QG for importer@patchew.org; Fri, 21 Jan 2022 19:19:49 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38952) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nB3ya-0000M4-Se for qemu-devel@nongnu.org; Fri, 21 Jan 2022 19:09:52 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:57934) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nB3yZ-0005BO-DC for qemu-devel@nongnu.org; Fri, 21 Jan 2022 19:09:52 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-467-ZcD0_eRlORejiJOVy1ObnQ-1; Fri, 21 Jan 2022 19:09:47 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A6E4318397BE; Sat, 22 Jan 2022 00:09:46 +0000 (UTC) Received: from scv.redhat.com (unknown [10.22.19.60]) by smtp.corp.redhat.com (Postfix) with ESMTP id A2BBB66E20; Sat, 22 Jan 2022 00:09:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1642810190; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5lSe5ckY9kwe3DbxpzcO3XBuqGw1v8fh2OicCiw7MTU=; b=L/NenD34wMHhJMLy3L9ztvIyH0uVWaHjtIrNwY0npjxFyQinIeGNQSaD3bX6R6vpWMKrMr 9H4XajnaCrjPK7gXK6soCrBJVQ0FyAfOSB5ZKo6NQ2NKvB+66vCrVwSBdazDg9Zm+Damxb 9iAegY3ytiPqykNTpGCSbMW8SfiMu3w= X-MC-Unique: ZcD0_eRlORejiJOVy1ObnQ-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PULL 05/17] python/aqmp: handle asyncio.TimeoutError on execute() Date: Fri, 21 Jan 2022 19:09:19 -0500 Message-Id: <20220122000931.536322-6-jsnow@redhat.com> In-Reply-To: <20220122000931.536322-1-jsnow@redhat.com> References: <20220122000931.536322-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=jsnow@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.699, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , Peter Maydell , Vladimir Sementsov-Ogievskiy , Beraldo Leal , Markus Armbruster , Cleber Rosa , John Snow Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1642810792139100001 Content-Type: text/plain; charset="utf-8" This exception can be injected into any await statement. If we are canceled via timeout, we want to clear the pending execution record on our way out. Signed-off-by: John Snow Reviewed-by: Beraldo Leal Reviewed-by: Vladimir Sementsov-Ogievskiy --- python/qemu/aqmp/qmp_client.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/python/qemu/aqmp/qmp_client.py b/python/qemu/aqmp/qmp_client.py index 8105e29fa8..6a985ffe30 100644 --- a/python/qemu/aqmp/qmp_client.py +++ b/python/qemu/aqmp/qmp_client.py @@ -435,7 +435,11 @@ async def _issue(self, msg: Message) -> Union[None, st= r]: msg_id =3D msg['id'] =20 self._pending[msg_id] =3D asyncio.Queue(maxsize=3D1) - await self._outgoing.put(msg) + try: + await self._outgoing.put(msg) + except: + del self._pending[msg_id] + raise =20 return msg_id =20 @@ -452,9 +456,9 @@ async def _reply(self, msg_id: Union[str, None]) -> Mes= sage: was lost, or some other problem. """ queue =3D self._pending[msg_id] - result =3D await queue.get() =20 try: + result =3D await queue.get() if isinstance(result, ExecInterruptedError): raise result return result --=20 2.31.1 From nobody Fri May 3 21:12:45 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1642810642075949.4494742733444; Fri, 21 Jan 2022 16:17:22 -0800 (PST) Received: from localhost ([::1]:39002 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nB45p-0000Xa-4B for importer@patchew.org; Fri, 21 Jan 2022 19:17:21 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38988) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nB3yg-0000Sh-Ov for qemu-devel@nongnu.org; Fri, 21 Jan 2022 19:09:58 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:34965) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nB3yc-0005C3-PJ for qemu-devel@nongnu.org; Fri, 21 Jan 2022 19:09:56 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-479-vhHBUj1cPeyDQweJomYntw-1; Fri, 21 Jan 2022 19:09:49 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AFE201083F60; Sat, 22 Jan 2022 00:09:47 +0000 (UTC) Received: from scv.redhat.com (unknown [10.22.19.60]) by smtp.corp.redhat.com (Postfix) with ESMTP id B715766E1B; Sat, 22 Jan 2022 00:09:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1642810194; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0v2bi/iKnBQnHBGcnKL71IR3kbZ4pUQZWZvaG0s/sbo=; b=Lu25/cJYs2suFCR/wIeu3g06fwfRi706pzGfzO8vi7CGk0ryRgK/VdmuTvwB3VOjEEI/Ea cd716MkISbqrPJVVLkh+iDHMiJotozOCMdEWSIz+P3YEpv+XXZqhmqJq2tN/dwEv6fgmZg 03s+1hjLilWW/sHxSjDM7tvyhgSyqqU= X-MC-Unique: vhHBUj1cPeyDQweJomYntw-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PULL 06/17] python/aqmp: copy type definitions from qmp Date: Fri, 21 Jan 2022 19:09:20 -0500 Message-Id: <20220122000931.536322-7-jsnow@redhat.com> In-Reply-To: <20220122000931.536322-1-jsnow@redhat.com> References: <20220122000931.536322-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=jsnow@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.699, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , Peter Maydell , Vladimir Sementsov-Ogievskiy , Beraldo Leal , Markus Armbruster , Cleber Rosa , John Snow Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1642810642867100001 Content-Type: text/plain; charset="utf-8" Copy the remaining type definitions from QMP into the qemu.aqmp.legacy module. Now, users that require the legacy interface don't need to import anything else but qemu.aqmp.legacy wrapper. Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Beraldo Leal --- python/qemu/aqmp/legacy.py | 22 ++++++++++++++++++++-- python/qemu/aqmp/protocol.py | 16 ++++++++++------ 2 files changed, 30 insertions(+), 8 deletions(-) diff --git a/python/qemu/aqmp/legacy.py b/python/qemu/aqmp/legacy.py index 2ccb136b02..9431fe9330 100644 --- a/python/qemu/aqmp/legacy.py +++ b/python/qemu/aqmp/legacy.py @@ -6,7 +6,9 @@ =20 import asyncio from typing import ( + Any, Awaitable, + Dict, List, Optional, TypeVar, @@ -14,13 +16,29 @@ ) =20 import qemu.qmp -from qemu.qmp import QMPMessage, QMPReturnValue, SocketAddrT =20 from .error import AQMPError -from .protocol import Runstate +from .protocol import Runstate, SocketAddrT from .qmp_client import QMPClient =20 =20 +#: QMPMessage is an entire QMP message of any kind. +QMPMessage =3D Dict[str, Any] + +#: QMPReturnValue is the 'return' value of a command. +QMPReturnValue =3D object + +#: QMPObject is any object in a QMP message. +QMPObject =3D Dict[str, object] + +# QMPMessage can be outgoing commands or incoming events/returns. +# QMPReturnValue is usually a dict/json object, but due to QAPI's +# 'returns-whitelist', it can actually be anything. +# +# {'return': {}} is a QMPMessage, +# {} is the QMPReturnValue. + + # pylint: disable=3Dmissing-docstring =20 =20 diff --git a/python/qemu/aqmp/protocol.py b/python/qemu/aqmp/protocol.py index c4fbe35a0e..5b4f2f0d0a 100644 --- a/python/qemu/aqmp/protocol.py +++ b/python/qemu/aqmp/protocol.py @@ -46,6 +46,10 @@ _U =3D TypeVar('_U') _TaskFN =3D Callable[[], Awaitable[None]] # aka ``async def func() -> Non= e`` =20 +InternetAddrT =3D Tuple[str, int] +UnixAddrT =3D str +SocketAddrT =3D Union[UnixAddrT, InternetAddrT] + =20 class Runstate(Enum): """Protocol session runstate.""" @@ -257,7 +261,7 @@ async def runstate_changed(self) -> Runstate: =20 @upper_half @require(Runstate.IDLE) - async def accept(self, address: Union[str, Tuple[str, int]], + async def accept(self, address: SocketAddrT, ssl: Optional[SSLContext] =3D None) -> None: """ Accept a connection and begin processing message queues. @@ -275,7 +279,7 @@ async def accept(self, address: Union[str, Tuple[str, i= nt]], =20 @upper_half @require(Runstate.IDLE) - async def connect(self, address: Union[str, Tuple[str, int]], + async def connect(self, address: SocketAddrT, ssl: Optional[SSLContext] =3D None) -> None: """ Connect to the server and begin processing message queues. @@ -337,7 +341,7 @@ def _set_state(self, state: Runstate) -> None: =20 @upper_half async def _new_session(self, - address: Union[str, Tuple[str, int]], + address: SocketAddrT, ssl: Optional[SSLContext] =3D None, accept: bool =3D False) -> None: """ @@ -397,7 +401,7 @@ async def _new_session(self, @upper_half async def _establish_connection( self, - address: Union[str, Tuple[str, int]], + address: SocketAddrT, ssl: Optional[SSLContext] =3D None, accept: bool =3D False ) -> None: @@ -424,7 +428,7 @@ async def _establish_connection( await self._do_connect(address, ssl) =20 @upper_half - async def _do_accept(self, address: Union[str, Tuple[str, int]], + async def _do_accept(self, address: SocketAddrT, ssl: Optional[SSLContext] =3D None) -> None: """ Acting as the transport server, accept a single connection. @@ -482,7 +486,7 @@ async def _client_connected_cb(reader: asyncio.StreamRe= ader, self.logger.debug("Connection accepted.") =20 @upper_half - async def _do_connect(self, address: Union[str, Tuple[str, int]], + async def _do_connect(self, address: SocketAddrT, ssl: Optional[SSLContext] =3D None) -> None: """ Acting as the transport client, initiate a connection to a server. --=20 2.31.1 From nobody Fri May 3 21:12:45 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1642810645335569.3833735482359; Fri, 21 Jan 2022 16:17:25 -0800 (PST) Received: from localhost ([::1]:39346 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nB45s-0000mo-Ac for importer@patchew.org; Fri, 21 Jan 2022 19:17:24 -0500 Received: from eggs.gnu.org ([209.51.188.92]:39014) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nB3yi-0000Yj-68 for qemu-devel@nongnu.org; Fri, 21 Jan 2022 19:10:00 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:41821) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nB3yg-0005CK-Mk for qemu-devel@nongnu.org; Fri, 21 Jan 2022 19:09:59 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-209-X4iOHbNgOgi7XVJ89zLdpg-1; Fri, 21 Jan 2022 19:09:49 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BEDA12F26; Sat, 22 Jan 2022 00:09:48 +0000 (UTC) Received: from scv.redhat.com (unknown [10.22.19.60]) by smtp.corp.redhat.com (Postfix) with ESMTP id D6BA366E1B; Sat, 22 Jan 2022 00:09:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1642810198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cRvk1EssMqIMNRz+Y1tAF0BP14oCpFSMW17YP9V7Ho8=; b=E9CJjal0MZ1h/+qm4A6e10Y2MECPk5rKJM6/IIcgPLEeOsyvIsxcodDsr5uGyruBb4qFy4 P3OWWR2deDKAEPZeU3aLT65kMBZckfZeelj6S68Bs2w1Oy2B+KRDMB+miPSmRWnH+uYZsT up82taoXMNpzNCssogKVJZ3r2Nyk4Tg= X-MC-Unique: X4iOHbNgOgi7XVJ89zLdpg-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PULL 07/17] python/aqmp: add SocketAddrT to package root Date: Fri, 21 Jan 2022 19:09:21 -0500 Message-Id: <20220122000931.536322-8-jsnow@redhat.com> In-Reply-To: <20220122000931.536322-1-jsnow@redhat.com> References: <20220122000931.536322-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=jsnow@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.699, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , Peter Maydell , Vladimir Sementsov-Ogievskiy , Beraldo Leal , Markus Armbruster , Cleber Rosa , John Snow Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1642810647602100007 Content-Type: text/plain; charset="utf-8" It's a commonly needed definition, it can be re-exported by the root. Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Beraldo Leal --- python/qemu/aqmp/__init__.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/python/qemu/aqmp/__init__.py b/python/qemu/aqmp/__init__.py index 173556404d..05f467c141 100644 --- a/python/qemu/aqmp/__init__.py +++ b/python/qemu/aqmp/__init__.py @@ -26,7 +26,12 @@ from .error import AQMPError from .events import EventListener from .message import Message -from .protocol import ConnectError, Runstate, StateError +from .protocol import ( + ConnectError, + Runstate, + SocketAddrT, + StateError, +) from .qmp_client import ExecInterruptedError, ExecuteError, QMPClient =20 =20 @@ -48,4 +53,7 @@ 'ConnectError', 'ExecuteError', 'ExecInterruptedError', + + # Type aliases + 'SocketAddrT', ) --=20 2.31.1 From nobody Fri May 3 21:12:45 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1642810791618666.9179985065331; Fri, 21 Jan 2022 16:19:51 -0800 (PST) Received: from localhost ([::1]:47418 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nB48E-0006Fs-AO for importer@patchew.org; Fri, 21 Jan 2022 19:19:50 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38990) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nB3yg-0000Sm-P8 for qemu-devel@nongnu.org; Fri, 21 Jan 2022 19:09:58 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:25525) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nB3yc-0005Bn-Gh for qemu-devel@nongnu.org; Fri, 21 Jan 2022 19:09:56 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-582-W0f7IIq9PuufoNjgvnaq5w-1; Fri, 21 Jan 2022 19:09:50 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BA67D2F49; Sat, 22 Jan 2022 00:09:49 +0000 (UTC) Received: from scv.redhat.com (unknown [10.22.19.60]) by smtp.corp.redhat.com (Postfix) with ESMTP id E6D2266E1B; Sat, 22 Jan 2022 00:09:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1642810193; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sdOJhruuN6fxTvu1NBxHScn9EgEMDzEHDJPjcPkDgIc=; b=Fgq2Q+0nMuCV9hrJtQh2mEFykxQfDDxGtu9MPevbaG1J+a/ei9hw8d/nUMxEZG8JeGawVP FKgYZ5ZRGzR8rlig9oQf803o/ZcXZ0BcwbYBGrlwoG7jwGsj6HHrSZZsbpJLqfYatJJc5K EszeQGN0WStxrCe8PNv0sM9GztvUB58= X-MC-Unique: W0f7IIq9PuufoNjgvnaq5w-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PULL 08/17] python/aqmp: rename AQMPError to QMPError Date: Fri, 21 Jan 2022 19:09:22 -0500 Message-Id: <20220122000931.536322-9-jsnow@redhat.com> In-Reply-To: <20220122000931.536322-1-jsnow@redhat.com> References: <20220122000931.536322-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=jsnow@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.699, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , Peter Maydell , Vladimir Sementsov-Ogievskiy , Markus Armbruster , Cleber Rosa , John Snow Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1642810792211100003 Content-Type: text/plain; charset="utf-8" This is in preparation for renaming qemu.aqmp to qemu.qmp. I should have done this from this from the very beginning, but it's a convenient time to make sure this churn is taken care of. Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy --- python/qemu/aqmp/__init__.py | 6 +++--- python/qemu/aqmp/error.py | 12 ++++++------ python/qemu/aqmp/events.py | 4 ++-- python/qemu/aqmp/legacy.py | 4 ++-- python/qemu/aqmp/protocol.py | 8 ++++---- python/qemu/aqmp/qmp_client.py | 8 ++++---- 6 files changed, 21 insertions(+), 21 deletions(-) diff --git a/python/qemu/aqmp/__init__.py b/python/qemu/aqmp/__init__.py index 05f467c141..4c22c38079 100644 --- a/python/qemu/aqmp/__init__.py +++ b/python/qemu/aqmp/__init__.py @@ -6,7 +6,7 @@ QEMU Guest Agent, and the QEMU Storage Daemon. =20 `QMPClient` provides the main functionality of this package. All errors -raised by this library derive from `AQMPError`, see `aqmp.error` for +raised by this library derive from `QMPError`, see `aqmp.error` for additional detail. See `aqmp.events` for an in-depth tutorial on managing QMP events. """ @@ -23,7 +23,7 @@ =20 import logging =20 -from .error import AQMPError +from .error import QMPError from .events import EventListener from .message import Message from .protocol import ( @@ -48,7 +48,7 @@ 'Runstate', =20 # Exceptions, most generic to most explicit - 'AQMPError', + 'QMPError', 'StateError', 'ConnectError', 'ExecuteError', diff --git a/python/qemu/aqmp/error.py b/python/qemu/aqmp/error.py index 781f49b008..24ba4d5054 100644 --- a/python/qemu/aqmp/error.py +++ b/python/qemu/aqmp/error.py @@ -1,21 +1,21 @@ """ -AQMP Error Classes +QMP Error Classes =20 This package seeks to provide semantic error classes that are intended to be used directly by clients when they would like to handle particular semantic failures (e.g. "failed to connect") without needing to know the enumeration of possible reasons for that failure. =20 -AQMPError serves as the ancestor for all exceptions raised by this +QMPError serves as the ancestor for all exceptions raised by this package, and is suitable for use in handling semantic errors from this library. In most cases, individual public methods will attempt to catch and re-encapsulate various exceptions to provide a semantic error-handling interface. =20 -.. admonition:: AQMP Exception Hierarchy Reference +.. admonition:: QMP Exception Hierarchy Reference =20 | `Exception` - | +-- `AQMPError` + | +-- `QMPError` | +-- `ConnectError` | +-- `StateError` | +-- `ExecInterruptedError` @@ -31,11 +31,11 @@ """ =20 =20 -class AQMPError(Exception): +class QMPError(Exception): """Abstract error class for all errors originating from this package."= "" =20 =20 -class ProtocolError(AQMPError): +class ProtocolError(QMPError): """ Abstract error class for protocol failures. =20 diff --git a/python/qemu/aqmp/events.py b/python/qemu/aqmp/events.py index 5f7150c78d..f3d4e2b5e8 100644 --- a/python/qemu/aqmp/events.py +++ b/python/qemu/aqmp/events.py @@ -443,7 +443,7 @@ def accept(self, event) -> bool: Union, ) =20 -from .error import AQMPError +from .error import QMPError from .message import Message =20 =20 @@ -451,7 +451,7 @@ def accept(self, event) -> bool: EventFilter =3D Callable[[Message], bool] =20 =20 -class ListenerError(AQMPError): +class ListenerError(QMPError): """ Generic error class for `EventListener`-related problems. """ diff --git a/python/qemu/aqmp/legacy.py b/python/qemu/aqmp/legacy.py index 9431fe9330..27df22818a 100644 --- a/python/qemu/aqmp/legacy.py +++ b/python/qemu/aqmp/legacy.py @@ -17,7 +17,7 @@ =20 import qemu.qmp =20 -from .error import AQMPError +from .error import QMPError from .protocol import Runstate, SocketAddrT from .qmp_client import QMPClient =20 @@ -168,7 +168,7 @@ def __del__(self) -> None: # Nothing we can do about it now, but if we don't raise our # own error, the user will be treated to a lot of traceback # they might not understand. - raise AQMPError( + raise QMPError( "QEMUMonitorProtocol.close()" " was not called before object was garbage collected" ) diff --git a/python/qemu/aqmp/protocol.py b/python/qemu/aqmp/protocol.py index 5b4f2f0d0a..50e973c2f2 100644 --- a/python/qemu/aqmp/protocol.py +++ b/python/qemu/aqmp/protocol.py @@ -29,7 +29,7 @@ cast, ) =20 -from .error import AQMPError +from .error import QMPError from .util import ( bottom_half, create_task, @@ -65,7 +65,7 @@ class Runstate(Enum): DISCONNECTING =3D 3 =20 =20 -class ConnectError(AQMPError): +class ConnectError(QMPError): """ Raised when the initial connection process has failed. =20 @@ -90,7 +90,7 @@ def __str__(self) -> str: return f"{self.error_message}: {cause}" =20 =20 -class StateError(AQMPError): +class StateError(QMPError): """ An API command (connect, execute, etc) was issued at an inappropriate = time. =20 @@ -363,7 +363,7 @@ async def _new_session(self, This exception will wrap a more concrete one. In most cases, the wrapped exception will be `OSError` or `EOFError`. If a protocol-level failure occurs while establishing a new - session, the wrapped error may also be an `AQMPError`. + session, the wrapped error may also be an `QMPError`. """ assert self.runstate =3D=3D Runstate.IDLE =20 diff --git a/python/qemu/aqmp/qmp_client.py b/python/qemu/aqmp/qmp_client.py index 6a985ffe30..f1a845cc82 100644 --- a/python/qemu/aqmp/qmp_client.py +++ b/python/qemu/aqmp/qmp_client.py @@ -20,7 +20,7 @@ cast, ) =20 -from .error import AQMPError, ProtocolError +from .error import ProtocolError, QMPError from .events import Events from .message import Message from .models import ErrorResponse, Greeting @@ -66,7 +66,7 @@ class NegotiationError(_WrappedProtocolError): """ =20 =20 -class ExecuteError(AQMPError): +class ExecuteError(QMPError): """ Exception raised by `QMPClient.execute()` on RPC failure. =20 @@ -87,7 +87,7 @@ def __init__(self, error_response: ErrorResponse, self.error_class: str =3D error_response.error.class_ =20 =20 -class ExecInterruptedError(AQMPError): +class ExecInterruptedError(QMPError): """ Exception raised by `execute()` (et al) when an RPC is interrupted. =20 @@ -641,7 +641,7 @@ def send_fd_scm(self, fd: int) -> None: sock =3D self._writer.transport.get_extra_info('socket') =20 if sock.family !=3D socket.AF_UNIX: - raise AQMPError("Sending file descriptors requires a UNIX sock= et.") + raise QMPError("Sending file descriptors requires a UNIX socke= t.") =20 if not hasattr(sock, 'sendmsg'): # We need to void the warranty sticker. --=20 2.31.1 From nobody Fri May 3 21:12:45 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 164281064447322.07060051255553; Fri, 21 Jan 2022 16:17:24 -0800 (PST) Received: from localhost ([::1]:39256 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nB45r-0000jI-Gk for importer@patchew.org; Fri, 21 Jan 2022 19:17:23 -0500 Received: from eggs.gnu.org ([209.51.188.92]:39012) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nB3yi-0000YT-38 for qemu-devel@nongnu.org; Fri, 21 Jan 2022 19:10:00 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:51797) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nB3yg-0005CF-Eu for qemu-devel@nongnu.org; Fri, 21 Jan 2022 19:09:59 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-471-UCmalK28MgGtZ11N1CWyGg-1; Fri, 21 Jan 2022 19:09:54 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C486E2F26; Sat, 22 Jan 2022 00:09:52 +0000 (UTC) Received: from scv.redhat.com (unknown [10.22.19.60]) by smtp.corp.redhat.com (Postfix) with ESMTP id E14D366E1B; Sat, 22 Jan 2022 00:09:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1642810197; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TNwWEgLA0yVEeTZP9l3mzoxTrUEAxmq2lgb74pBHN/Q=; b=DNaPLQtH/nA1oDs0jEi1VAwWs1+oo/Z5OoOivJCc6nJjhkt8IAOyeME2O6PJr8DQWduEHN UpcmRU54TvJlrqsKRCZsPh3Q8j70SX2pAr1/gscR2Fl80pRwMdyYHUsPCix4dZGhuv8XVx bC7xXYXUg38MF3aE52tVqQy1yq9/Qm0= X-MC-Unique: UCmalK28MgGtZ11N1CWyGg-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PULL 09/17] python/qemu-ga-client: don't use deprecated CLI syntax in usage comment Date: Fri, 21 Jan 2022 19:09:23 -0500 Message-Id: <20220122000931.536322-10-jsnow@redhat.com> In-Reply-To: <20220122000931.536322-1-jsnow@redhat.com> References: <20220122000931.536322-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=jsnow@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.699, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , Peter Maydell , Vladimir Sementsov-Ogievskiy , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Markus Armbruster , Cleber Rosa , John Snow Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1642810645648100005 Cleanup related to commit ccd3b3b8112b670f, "qemu-option: warn for short-form boolean options". Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Daniel P. Berrang=C3=A9 --- python/qemu/qmp/qemu_ga_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/qemu/qmp/qemu_ga_client.py b/python/qemu/qmp/qemu_ga_cl= ient.py index 67ac0b4211..b3e1d98c9e 100644 --- a/python/qemu/qmp/qemu_ga_client.py +++ b/python/qemu/qmp/qemu_ga_client.py @@ -5,7 +5,7 @@ =20 Start QEMU with: =20 -# qemu [...] -chardev socket,path=3D/tmp/qga.sock,server,wait=3Doff,id=3Dq= ga0 \ +# qemu [...] -chardev socket,path=3D/tmp/qga.sock,server=3Don,wait=3Doff,i= d=3Dqga0 \ -device virtio-serial \ -device virtserialport,chardev=3Dqga0,name=3Dorg.qemu.guest_agent.0 =20 --=20 2.31.1 From nobody Fri May 3 21:12:45 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 164281133562043.399636938146614; Fri, 21 Jan 2022 16:28:55 -0800 (PST) Received: from localhost ([::1]:35160 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nB4H0-0000g1-96 for importer@patchew.org; Fri, 21 Jan 2022 19:28:54 -0500 Received: from eggs.gnu.org ([209.51.188.92]:39114) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nB3yo-0000sZ-Am for qemu-devel@nongnu.org; Fri, 21 Jan 2022 19:10:06 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:41830) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nB3ym-0005Kd-3l for qemu-devel@nongnu.org; Fri, 21 Jan 2022 19:10:05 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-5-eQNXAlPzObyGwQm5-fbUHw-1; Fri, 21 Jan 2022 19:09:55 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D5DDC1083F61; Sat, 22 Jan 2022 00:09:53 +0000 (UTC) Received: from scv.redhat.com (unknown [10.22.19.60]) by smtp.corp.redhat.com (Postfix) with ESMTP id EB83C66E1B; Sat, 22 Jan 2022 00:09:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1642810203; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AW2FhHRH7pKjv6l/23XsAtQ4lKxZE7wChiPYstouEvU=; b=iwCq1Xt/Y+v2oSSdidk9EoVZHungt/tCIaRdwItMhCYS1stALqVvYtM2TiLviwlCL9sMGk WM9f0OmLyfFPeS8YSqTDECb/tZmjOqcxl4vsguBfFC7O4dcAaRLW457gNn30Qh86d2cSB8 vO7pz/2DYVjXFziDLUIVpcnZF7BclSU= X-MC-Unique: eQNXAlPzObyGwQm5-fbUHw-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PULL 10/17] python/qmp: switch qemu-ga-client to AQMP Date: Fri, 21 Jan 2022 19:09:24 -0500 Message-Id: <20220122000931.536322-11-jsnow@redhat.com> In-Reply-To: <20220122000931.536322-1-jsnow@redhat.com> References: <20220122000931.536322-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=jsnow@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.699, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , Peter Maydell , Vladimir Sementsov-Ogievskiy , Beraldo Leal , Markus Armbruster , Cleber Rosa , John Snow Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1642811336797100001 Content-Type: text/plain; charset="utf-8" Async QMP always raises a "ConnectError" on any connection error which houses the cause in a second exception. We can check if this root cause was python's ConnectionError to determine a fairly similar condition to the original error check here. Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Beraldo Leal --- python/qemu/qmp/qemu_ga_client.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/python/qemu/qmp/qemu_ga_client.py b/python/qemu/qmp/qemu_ga_cl= ient.py index b3e1d98c9e..15ed430c61 100644 --- a/python/qemu/qmp/qemu_ga_client.py +++ b/python/qemu/qmp/qemu_ga_client.py @@ -37,8 +37,8 @@ # the COPYING file in the top-level directory. =20 import argparse +import asyncio import base64 -import errno import os import random import sys @@ -50,8 +50,8 @@ Sequence, ) =20 -from qemu import qmp -from qemu.qmp import SocketAddrT +from qemu.aqmp import ConnectError, SocketAddrT +from qemu.aqmp.legacy import QEMUMonitorProtocol =20 =20 # This script has not seen many patches or careful attention in quite @@ -61,7 +61,7 @@ # pylint: disable=3Dmissing-docstring =20 =20 -class QemuGuestAgent(qmp.QEMUMonitorProtocol): +class QemuGuestAgent(QEMUMonitorProtocol): def __getattr__(self, name: str) -> Callable[..., Any]: def wrapper(**kwds: object) -> object: return self.command('guest-' + name.replace('_', '-'), **kwds) @@ -149,7 +149,7 @@ def ping(self, timeout: Optional[float]) -> bool: self.qga.settimeout(timeout) try: self.qga.ping() - except TimeoutError: + except asyncio.TimeoutError: return False return True =20 @@ -172,7 +172,7 @@ def suspend(self, mode: str) -> None: try: getattr(self.qga, 'suspend' + '_' + mode)() # On error exception will raise - except TimeoutError: + except asyncio.TimeoutError: # On success command will timed out return =20 @@ -182,7 +182,7 @@ def shutdown(self, mode: str =3D 'powerdown') -> None: =20 try: self.qga.shutdown(mode=3Dmode) - except TimeoutError: + except asyncio.TimeoutError: pass =20 =20 @@ -277,7 +277,7 @@ def _cmd_reboot(client: QemuGuestAgentClient, args: Seq= uence[str]) -> None: =20 def send_command(address: str, cmd: str, args: Sequence[str]) -> None: if not os.path.exists(address): - print('%s not found' % address) + print(f"'{address}' not found. (Is QEMU running?)") sys.exit(1) =20 if cmd not in commands: @@ -287,10 +287,10 @@ def send_command(address: str, cmd: str, args: Sequen= ce[str]) -> None: =20 try: client =3D QemuGuestAgentClient(address) - except OSError as err: + except ConnectError as err: print(err) - if err.errno =3D=3D errno.ECONNREFUSED: - print('Hint: qemu is not running?') + if isinstance(err.exc, ConnectionError): + print('(Is QEMU running?)') sys.exit(1) =20 if cmd =3D=3D 'fsfreeze' and args[0] =3D=3D 'freeze': --=20 2.31.1 From nobody Fri May 3 21:12:45 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1642811043983372.53800860460206; Fri, 21 Jan 2022 16:24:03 -0800 (PST) Received: from localhost ([::1]:55758 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nB4CI-0003jB-VW for importer@patchew.org; Fri, 21 Jan 2022 19:24:03 -0500 Received: from eggs.gnu.org ([209.51.188.92]:39150) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nB3yr-0000vO-DD for qemu-devel@nongnu.org; Fri, 21 Jan 2022 19:10:11 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:22498) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nB3yn-0005Pq-QQ for qemu-devel@nongnu.org; Fri, 21 Jan 2022 19:10:07 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-628-0GQ1Q5Q-PzGW2vtAxxD0cg-1; Fri, 21 Jan 2022 19:09:56 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E9430814246; Sat, 22 Jan 2022 00:09:54 +0000 (UTC) Received: from scv.redhat.com (unknown [10.22.19.60]) by smtp.corp.redhat.com (Postfix) with ESMTP id 086A566E1B; Sat, 22 Jan 2022 00:09:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1642810205; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Zg9LZjkORuTr62yl0AayXxZT2OhZL8s4pf5wPYMaJQc=; b=fao4YGjMqRdjNeDj2ZtZsKnEZIVcxz1ls6M5x0MAu8GOvCK2EuFUB5TNFdWgcOJ/eET7gI VDkvyEooPdhpTNnK6KZ1GSDZpPEiINcbFQhx3F8sZE9qFsi9ldrOVzR2LcmOBxTjQnBhGv hIMfKkt/72JLdqQYFzXEk8VpCFUM/j0= X-MC-Unique: 0GQ1Q5Q-PzGW2vtAxxD0cg-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PULL 11/17] python/qmp: switch qom tools to AQMP Date: Fri, 21 Jan 2022 19:09:25 -0500 Message-Id: <20220122000931.536322-12-jsnow@redhat.com> In-Reply-To: <20220122000931.536322-1-jsnow@redhat.com> References: <20220122000931.536322-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=jsnow@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.699, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , Peter Maydell , Vladimir Sementsov-Ogievskiy , Beraldo Leal , Markus Armbruster , Cleber Rosa , John Snow Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1642811045605100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Beraldo Leal --- python/qemu/qmp/qom.py | 5 +++-- python/qemu/qmp/qom_common.py | 3 ++- python/qemu/qmp/qom_fuse.py | 11 ++++++----- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/python/qemu/qmp/qom.py b/python/qemu/qmp/qom.py index 8ff28a8343..bb5d1a78f5 100644 --- a/python/qemu/qmp/qom.py +++ b/python/qemu/qmp/qom.py @@ -32,7 +32,8 @@ =20 import argparse =20 -from . import QMPResponseError +from qemu.aqmp import ExecuteError + from .qom_common import QOMCommand =20 =20 @@ -233,7 +234,7 @@ def _list_node(self, path: str) -> None: rsp =3D self.qmp.command('qom-get', path=3Dpath, property=3Ditem.name) print(f" {item.name}: {rsp} ({item.type})") - except QMPResponseError as err: + except ExecuteError as err: print(f" {item.name}: ({item.type})") print('') for item in items: diff --git a/python/qemu/qmp/qom_common.py b/python/qemu/qmp/qom_common.py index 2e4c741f77..e034a6f247 100644 --- a/python/qemu/qmp/qom_common.py +++ b/python/qemu/qmp/qom_common.py @@ -27,7 +27,8 @@ TypeVar, ) =20 -from . import QEMUMonitorProtocol, QMPError +from qemu.aqmp import QMPError +from qemu.aqmp.legacy import QEMUMonitorProtocol =20 =20 class ObjectPropertyInfo: diff --git a/python/qemu/qmp/qom_fuse.py b/python/qemu/qmp/qom_fuse.py index 43f4671fdb..653a76b93b 100644 --- a/python/qemu/qmp/qom_fuse.py +++ b/python/qemu/qmp/qom_fuse.py @@ -48,7 +48,8 @@ import fuse from fuse import FUSE, FuseOSError, Operations =20 -from . import QMPResponseError +from qemu.aqmp import ExecuteError + from .qom_common import QOMCommand =20 =20 @@ -99,7 +100,7 @@ def is_object(self, path: str) -> bool: try: self.qom_list(path) return True - except QMPResponseError: + except ExecuteError: return False =20 def is_property(self, path: str) -> bool: @@ -112,7 +113,7 @@ def is_property(self, path: str) -> bool: if item.name =3D=3D prop: return True return False - except QMPResponseError: + except ExecuteError: return False =20 def is_link(self, path: str) -> bool: @@ -125,7 +126,7 @@ def is_link(self, path: str) -> bool: if item.name =3D=3D prop and item.link: return True return False - except QMPResponseError: + except ExecuteError: return False =20 def read(self, path: str, size: int, offset: int, fh: IO[bytes]) -> by= tes: @@ -138,7 +139,7 @@ def read(self, path: str, size: int, offset: int, fh: I= O[bytes]) -> bytes: try: data =3D str(self.qmp.command('qom-get', path=3Dpath, property= =3Dprop)) data +=3D '\n' # make values shell friendly - except QMPResponseError as err: + except ExecuteError as err: raise FuseOSError(EPERM) from err =20 if offset > len(data): --=20 2.31.1 From nobody Fri May 3 21:12:45 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1642811043887522.164450112367; Fri, 21 Jan 2022 16:24:03 -0800 (PST) Received: from localhost ([::1]:55802 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nB4CI-0003lJ-SI for importer@patchew.org; Fri, 21 Jan 2022 19:24:02 -0500 Received: from eggs.gnu.org ([209.51.188.92]:39036) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nB3yk-0000hR-LJ for qemu-devel@nongnu.org; Fri, 21 Jan 2022 19:10:02 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:29547) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nB3yi-0005Cr-Oa for qemu-devel@nongnu.org; Fri, 21 Jan 2022 19:10:02 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-519-EUQEtFBLPmOgi0rnIMm6qA-1; Fri, 21 Jan 2022 19:09:57 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E707E802925; Sat, 22 Jan 2022 00:09:55 +0000 (UTC) Received: from scv.redhat.com (unknown [10.22.19.60]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1CC3E66E1B; Sat, 22 Jan 2022 00:09:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1642810200; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5fapd+iJCU2gqTizCl2vmpK4gpAcQOtyiLCN9oHVTd8=; b=NGuByNZ0QWdt+KOnNyStVxoeGROCwvcr+s88p6+I9FXmM3rzpCCwx18HOnp/BT1kzIpcVH VWwnlqlrunMgU8N9M7YU3bMWKe6AG1F0tpKL9noiV9lzXtV5E3G3WF8h1RJ9YDWn3R0zHN ahBUWInEgCg3bfHfM5SC6s8xR7Z+IVs= X-MC-Unique: EUQEtFBLPmOgi0rnIMm6qA-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PULL 12/17] python/qmp: switch qmp-shell to AQMP Date: Fri, 21 Jan 2022 19:09:26 -0500 Message-Id: <20220122000931.536322-13-jsnow@redhat.com> In-Reply-To: <20220122000931.536322-1-jsnow@redhat.com> References: <20220122000931.536322-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=jsnow@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.699, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , Peter Maydell , Vladimir Sementsov-Ogievskiy , Markus Armbruster , Cleber Rosa , John Snow Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1642811045619100002 Content-Type: text/plain; charset="utf-8" We have a replacement for async QMP, but it doesn't have feature parity yet. For now, then, port the old tool onto the new backend. Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy --- python/qemu/aqmp/legacy.py | 3 +++ python/qemu/qmp/qmp_shell.py | 31 +++++++++++++++++-------------- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/python/qemu/aqmp/legacy.py b/python/qemu/aqmp/legacy.py index 27df22818a..0890f95b16 100644 --- a/python/qemu/aqmp/legacy.py +++ b/python/qemu/aqmp/legacy.py @@ -22,6 +22,9 @@ from .qmp_client import QMPClient =20 =20 +# (Temporarily) Re-export QMPBadPortError +QMPBadPortError =3D qemu.qmp.QMPBadPortError + #: QMPMessage is an entire QMP message of any kind. QMPMessage =3D Dict[str, Any] =20 diff --git a/python/qemu/qmp/qmp_shell.py b/python/qemu/qmp/qmp_shell.py index e7d7eb18f1..d11bf54b00 100644 --- a/python/qemu/qmp/qmp_shell.py +++ b/python/qemu/qmp/qmp_shell.py @@ -95,8 +95,13 @@ Sequence, ) =20 -from qemu import qmp -from qemu.qmp import QMPMessage +from qemu.aqmp import ConnectError, QMPError, SocketAddrT +from qemu.aqmp.legacy import ( + QEMUMonitorProtocol, + QMPBadPortError, + QMPMessage, + QMPObject, +) =20 =20 LOG =3D logging.getLogger(__name__) @@ -125,7 +130,7 @@ def complete(self, text: str, state: int) -> Optional[s= tr]: return None =20 =20 -class QMPShellError(qmp.QMPError): +class QMPShellError(QMPError): """ QMP Shell Base error class. """ @@ -153,7 +158,7 @@ def visit_Name(cls, # pylint: disable=3Dinvalid-name return node =20 =20 -class QMPShell(qmp.QEMUMonitorProtocol): +class QMPShell(QEMUMonitorProtocol): """ QMPShell provides a basic readline-based QMP shell. =20 @@ -161,7 +166,7 @@ class QMPShell(qmp.QEMUMonitorProtocol): :param pretty: Pretty-print QMP messages. :param verbose: Echo outgoing QMP messages to console. """ - def __init__(self, address: qmp.SocketAddrT, + def __init__(self, address: SocketAddrT, pretty: bool =3D False, verbose: bool =3D False): super().__init__(address) self._greeting: Optional[QMPMessage] =3D None @@ -237,7 +242,7 @@ def _parse_value(cls, val: str) -> object: =20 def _cli_expr(self, tokens: Sequence[str], - parent: qmp.QMPObject) -> None: + parent: QMPObject) -> None: for arg in tokens: (key, sep, val) =3D arg.partition('=3D') if sep !=3D '=3D': @@ -403,7 +408,7 @@ class HMPShell(QMPShell): :param pretty: Pretty-print QMP messages. :param verbose: Echo outgoing QMP messages to console. """ - def __init__(self, address: qmp.SocketAddrT, + def __init__(self, address: SocketAddrT, pretty: bool =3D False, verbose: bool =3D False): super().__init__(address, pretty, verbose) self._cpu_index =3D 0 @@ -512,19 +517,17 @@ def main() -> None: =20 try: address =3D shell_class.parse_address(args.qmp_server) - except qmp.QMPBadPortError: + except QMPBadPortError: parser.error(f"Bad port number: {args.qmp_server}") return # pycharm doesn't know error() is noreturn =20 with shell_class(address, args.pretty, args.verbose) as qemu: try: qemu.connect(negotiate=3Dnot args.skip_negotiation) - except qmp.QMPConnectError: - die("Didn't get QMP greeting message") - except qmp.QMPCapabilitiesError: - die("Couldn't negotiate capabilities") - except OSError as err: - die(f"Couldn't connect to {args.qmp_server}: {err!s}") + except ConnectError as err: + if isinstance(err.exc, OSError): + die(f"Couldn't connect to {args.qmp_server}: {err!s}") + die(str(err)) =20 for _ in qemu.repl(): pass --=20 2.31.1 From nobody Fri May 3 21:12:45 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1642810794208328.00983050937896; Fri, 21 Jan 2022 16:19:54 -0800 (PST) Received: from localhost ([::1]:47626 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nB48H-0006Ow-80 for importer@patchew.org; Fri, 21 Jan 2022 19:19:53 -0500 Received: from eggs.gnu.org ([209.51.188.92]:39064) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nB3ym-0000nD-1b for qemu-devel@nongnu.org; Fri, 21 Jan 2022 19:10:04 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:59960) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nB3yj-0005Cw-Ts for qemu-devel@nongnu.org; Fri, 21 Jan 2022 19:10:03 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-502-Q0CovzE7Pe2-h2rGyy0Ziw-1; Fri, 21 Jan 2022 19:09:58 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0B00F1083F61; Sat, 22 Jan 2022 00:09:57 +0000 (UTC) Received: from scv.redhat.com (unknown [10.22.19.60]) by smtp.corp.redhat.com (Postfix) with ESMTP id 19E0066E1B; Sat, 22 Jan 2022 00:09:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1642810201; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0MVUHv1zqP0cfHgfl0rZftVCiojbBaOgmNDdX8yrSgg=; b=LCPOLcVoVBsmQTpd31GFqNJvHcoTJwf/KQOFZJBtMDnfvYG5Y4QVdvDvRjUYTE6uwgufaB nn0YGyQ0miTiqo4qw3LTJKQSj17qixXqZm+RcmdBaxD+R6OMNDqSfKYiC99agXEfpe7Zd4 U9flKAla7AhjyorNO8u++hw0h3MpSig= X-MC-Unique: Q0CovzE7Pe2-h2rGyy0Ziw-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PULL 13/17] python: move qmp utilities to python/qemu/utils Date: Fri, 21 Jan 2022 19:09:27 -0500 Message-Id: <20220122000931.536322-14-jsnow@redhat.com> In-Reply-To: <20220122000931.536322-1-jsnow@redhat.com> References: <20220122000931.536322-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=jsnow@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.699, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , Peter Maydell , Vladimir Sementsov-Ogievskiy , Beraldo Leal , Markus Armbruster , Cleber Rosa , John Snow Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1642810796472100001 Content-Type: text/plain; charset="utf-8" In order to upload a QMP package to PyPI, I want to remove any scripts that I am not 100% confident I want to support upstream, beyond our castle walls. Move most of our QMP utilities into the utils package so we can split them out from the PyPI upload. Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Beraldo Leal --- python/qemu/{qmp =3D> utils}/qemu_ga_client.py | 0 python/qemu/{qmp =3D> utils}/qom.py | 0 python/qemu/{qmp =3D> utils}/qom_common.py | 0 python/qemu/{qmp =3D> utils}/qom_fuse.py | 0 python/setup.cfg | 16 ++++++++-------- scripts/qmp/qemu-ga-client | 2 +- scripts/qmp/qom-fuse | 2 +- scripts/qmp/qom-get | 2 +- scripts/qmp/qom-list | 2 +- scripts/qmp/qom-set | 2 +- scripts/qmp/qom-tree | 2 +- 11 files changed, 14 insertions(+), 14 deletions(-) rename python/qemu/{qmp =3D> utils}/qemu_ga_client.py (100%) rename python/qemu/{qmp =3D> utils}/qom.py (100%) rename python/qemu/{qmp =3D> utils}/qom_common.py (100%) rename python/qemu/{qmp =3D> utils}/qom_fuse.py (100%) diff --git a/python/qemu/qmp/qemu_ga_client.py b/python/qemu/utils/qemu_ga_= client.py similarity index 100% rename from python/qemu/qmp/qemu_ga_client.py rename to python/qemu/utils/qemu_ga_client.py diff --git a/python/qemu/qmp/qom.py b/python/qemu/utils/qom.py similarity index 100% rename from python/qemu/qmp/qom.py rename to python/qemu/utils/qom.py diff --git a/python/qemu/qmp/qom_common.py b/python/qemu/utils/qom_common.py similarity index 100% rename from python/qemu/qmp/qom_common.py rename to python/qemu/utils/qom_common.py diff --git a/python/qemu/qmp/qom_fuse.py b/python/qemu/utils/qom_fuse.py similarity index 100% rename from python/qemu/qmp/qom_fuse.py rename to python/qemu/utils/qom_fuse.py diff --git a/python/setup.cfg b/python/setup.cfg index aa238d8bc9..04a41ef1a0 100644 --- a/python/setup.cfg +++ b/python/setup.cfg @@ -60,13 +60,13 @@ tui =3D =20 [options.entry_points] console_scripts =3D - qom =3D qemu.qmp.qom:main - qom-set =3D qemu.qmp.qom:QOMSet.entry_point - qom-get =3D qemu.qmp.qom:QOMGet.entry_point - qom-list =3D qemu.qmp.qom:QOMList.entry_point - qom-tree =3D qemu.qmp.qom:QOMTree.entry_point - qom-fuse =3D qemu.qmp.qom_fuse:QOMFuse.entry_point [fuse] - qemu-ga-client =3D qemu.qmp.qemu_ga_client:main + qom =3D qemu.utils.qom:main + qom-set =3D qemu.utils.qom:QOMSet.entry_point + qom-get =3D qemu.utils.qom:QOMGet.entry_point + qom-list =3D qemu.utils.qom:QOMList.entry_point + qom-tree =3D qemu.utils.qom:QOMTree.entry_point + qom-fuse =3D qemu.utils.qom_fuse:QOMFuse.entry_point [fuse] + qemu-ga-client =3D qemu.utils.qemu_ga_client:main qmp-shell =3D qemu.qmp.qmp_shell:main aqmp-tui =3D qemu.aqmp.aqmp_tui:main [tui] =20 @@ -80,7 +80,7 @@ python_version =3D 3.6 warn_unused_configs =3D True namespace_packages =3D True =20 -[mypy-qemu.qmp.qom_fuse] +[mypy-qemu.utils.qom_fuse] # fusepy has no type stubs: allow_subclassing_any =3D True =20 diff --git a/scripts/qmp/qemu-ga-client b/scripts/qmp/qemu-ga-client index 102fd2cad9..56edd0234a 100755 --- a/scripts/qmp/qemu-ga-client +++ b/scripts/qmp/qemu-ga-client @@ -4,7 +4,7 @@ import os import sys =20 sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'pytho= n')) -from qemu.qmp import qemu_ga_client +from qemu.utils import qemu_ga_client =20 =20 if __name__ =3D=3D '__main__': diff --git a/scripts/qmp/qom-fuse b/scripts/qmp/qom-fuse index a58c8ef979..d453807b27 100755 --- a/scripts/qmp/qom-fuse +++ b/scripts/qmp/qom-fuse @@ -4,7 +4,7 @@ import os import sys =20 sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'pytho= n')) -from qemu.qmp.qom_fuse import QOMFuse +from qemu.utils.qom_fuse import QOMFuse =20 =20 if __name__ =3D=3D '__main__': diff --git a/scripts/qmp/qom-get b/scripts/qmp/qom-get index e4f3e0c013..04ebe052e8 100755 --- a/scripts/qmp/qom-get +++ b/scripts/qmp/qom-get @@ -4,7 +4,7 @@ import os import sys =20 sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'pytho= n')) -from qemu.qmp.qom import QOMGet +from qemu.utils.qom import QOMGet =20 =20 if __name__ =3D=3D '__main__': diff --git a/scripts/qmp/qom-list b/scripts/qmp/qom-list index 7a071a54e1..853b85a8d3 100755 --- a/scripts/qmp/qom-list +++ b/scripts/qmp/qom-list @@ -4,7 +4,7 @@ import os import sys =20 sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'pytho= n')) -from qemu.qmp.qom import QOMList +from qemu.utils.qom import QOMList =20 =20 if __name__ =3D=3D '__main__': diff --git a/scripts/qmp/qom-set b/scripts/qmp/qom-set index 9ca9e2ba10..06820feec4 100755 --- a/scripts/qmp/qom-set +++ b/scripts/qmp/qom-set @@ -4,7 +4,7 @@ import os import sys =20 sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'pytho= n')) -from qemu.qmp.qom import QOMSet +from qemu.utils.qom import QOMSet =20 =20 if __name__ =3D=3D '__main__': diff --git a/scripts/qmp/qom-tree b/scripts/qmp/qom-tree index 7d0ccca3a4..760e172277 100755 --- a/scripts/qmp/qom-tree +++ b/scripts/qmp/qom-tree @@ -4,7 +4,7 @@ import os import sys =20 sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'pytho= n')) -from qemu.qmp.qom import QOMTree +from qemu.utils.qom import QOMTree =20 =20 if __name__ =3D=3D '__main__': --=20 2.31.1 From nobody Fri May 3 21:12:45 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1642810793881678.6598467559994; Fri, 21 Jan 2022 16:19:53 -0800 (PST) Received: from localhost ([::1]:47672 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nB48G-0006QQ-Oq for importer@patchew.org; Fri, 21 Jan 2022 19:19:52 -0500 Received: from eggs.gnu.org ([209.51.188.92]:39090) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nB3ym-0000p5-PQ for qemu-devel@nongnu.org; Fri, 21 Jan 2022 19:10:04 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:22277) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nB3yk-0005DE-UC for qemu-devel@nongnu.org; Fri, 21 Jan 2022 19:10:04 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-591-PAjm4lDmOEKwsZTxqR9MzA-1; Fri, 21 Jan 2022 19:09:59 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1B28C814245; Sat, 22 Jan 2022 00:09:58 +0000 (UTC) Received: from scv.redhat.com (unknown [10.22.19.60]) by smtp.corp.redhat.com (Postfix) with ESMTP id 335C766E1B; Sat, 22 Jan 2022 00:09:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1642810202; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SshM71Jpklre0pXZ2WkAr73ZmOyW4L9PGg1YM2fydoU=; b=ABzwtz0VcdTjyELOvps9BuoD3K+R2vVCn4i2CGRjAlUBLci8u4MafxgTUwmVrWDj1hRQMu RGVTBKbYyFiUXTVoz4Ii2/IrVtOiow0oNpDNdlfhZF2VyzuKr2fy9YJh0r3ejZtu1Qj3kS vPu3jOlN7xsfZpzGameLPGVAEQS9v0A= X-MC-Unique: PAjm4lDmOEKwsZTxqR9MzA-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PULL 14/17] python: move qmp-shell under the AQMP package Date: Fri, 21 Jan 2022 19:09:28 -0500 Message-Id: <20220122000931.536322-15-jsnow@redhat.com> In-Reply-To: <20220122000931.536322-1-jsnow@redhat.com> References: <20220122000931.536322-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=jsnow@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.699, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , Peter Maydell , Vladimir Sementsov-Ogievskiy , Beraldo Leal , Markus Armbruster , Cleber Rosa , John Snow Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1642810794414100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Beraldo Leal --- python/README.rst | 2 +- python/qemu/{qmp =3D> aqmp}/qmp_shell.py | 0 python/setup.cfg | 2 +- scripts/qmp/qmp-shell | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) rename python/qemu/{qmp =3D> aqmp}/qmp_shell.py (100%) diff --git a/python/README.rst b/python/README.rst index 9c1fceaee7..fcf74f69ea 100644 --- a/python/README.rst +++ b/python/README.rst @@ -59,7 +59,7 @@ Package installation also normally provides executable co= nsole scripts, so that tools like ``qmp-shell`` are always available via $PATH. To invoke them without installation, you can invoke e.g.: =20 -``> PYTHONPATH=3D~/src/qemu/python python3 -m qemu.qmp.qmp_shell`` +``> PYTHONPATH=3D~/src/qemu/python python3 -m qemu.aqmp.qmp_shell`` =20 The mappings between console script name and python module path can be found in ``setup.cfg``. diff --git a/python/qemu/qmp/qmp_shell.py b/python/qemu/aqmp/qmp_shell.py similarity index 100% rename from python/qemu/qmp/qmp_shell.py rename to python/qemu/aqmp/qmp_shell.py diff --git a/python/setup.cfg b/python/setup.cfg index 04a41ef1a0..3fb18f845d 100644 --- a/python/setup.cfg +++ b/python/setup.cfg @@ -67,7 +67,7 @@ console_scripts =3D qom-tree =3D qemu.utils.qom:QOMTree.entry_point qom-fuse =3D qemu.utils.qom_fuse:QOMFuse.entry_point [fuse] qemu-ga-client =3D qemu.utils.qemu_ga_client:main - qmp-shell =3D qemu.qmp.qmp_shell:main + qmp-shell =3D qemu.aqmp.qmp_shell:main aqmp-tui =3D qemu.aqmp.aqmp_tui:main [tui] =20 [flake8] diff --git a/scripts/qmp/qmp-shell b/scripts/qmp/qmp-shell index 4a20f97db7..31b19d73e2 100755 --- a/scripts/qmp/qmp-shell +++ b/scripts/qmp/qmp-shell @@ -4,7 +4,7 @@ import os import sys =20 sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'pytho= n')) -from qemu.qmp import qmp_shell +from qemu.aqmp import qmp_shell =20 =20 if __name__ =3D=3D '__main__': --=20 2.31.1 From nobody Fri May 3 21:12:45 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1642811046209276.0593915354149; Fri, 21 Jan 2022 16:24:06 -0800 (PST) Received: from localhost ([::1]:56010 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nB4CL-0003tB-6i for importer@patchew.org; Fri, 21 Jan 2022 19:24:05 -0500 Received: from eggs.gnu.org ([209.51.188.92]:39108) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nB3yn-0000r6-Lv for qemu-devel@nongnu.org; Fri, 21 Jan 2022 19:10:05 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:41379) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nB3yl-0005IN-Rs for qemu-devel@nongnu.org; Fri, 21 Jan 2022 19:10:05 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-18-LsKINQQHN_Wg55GiXCc16w-1; Fri, 21 Jan 2022 19:10:00 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 29F1E814249; Sat, 22 Jan 2022 00:09:59 +0000 (UTC) Received: from scv.redhat.com (unknown [10.22.19.60]) by smtp.corp.redhat.com (Postfix) with ESMTP id 432B866E20; Sat, 22 Jan 2022 00:09:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1642810203; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cN//P8Qy75ycCLA04A+FinwrhfJje8e0FQvGeIYqQC4=; b=VElbte60L3/Ip51Qm2Cea8E3FEixbXQGJ0+tJW3SAkne2w6Mr3vxtmM+xGMlJDPFBJq7wG He4iTDQa8iaCwL9c70PmxSzgDpXFclpc1azAe9FYeo8XaeRFl5ukaRzVm+XEdhY2sX6Rr3 BvyWFzPCvtQYiKcngpI3wkFcjK4mkQ8= X-MC-Unique: LsKINQQHN_Wg55GiXCc16w-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PULL 15/17] scripts/cpu-x86-uarch-abi: fix CLI parsing Date: Fri, 21 Jan 2022 19:09:29 -0500 Message-Id: <20220122000931.536322-16-jsnow@redhat.com> In-Reply-To: <20220122000931.536322-1-jsnow@redhat.com> References: <20220122000931.536322-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=jsnow@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.699, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , Peter Maydell , Vladimir Sementsov-Ogievskiy , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Markus Armbruster , Cleber Rosa , John Snow Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1642811047607100005 Signed-off-by: John Snow Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Vladimir Sementsov-Ogievskiy --- scripts/cpu-x86-uarch-abi.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/cpu-x86-uarch-abi.py b/scripts/cpu-x86-uarch-abi.py index 08acc52a81..8963d90f0b 100644 --- a/scripts/cpu-x86-uarch-abi.py +++ b/scripts/cpu-x86-uarch-abi.py @@ -9,7 +9,7 @@ from qemu import qmp import sys =20 -if len(sys.argv) !=3D 1: +if len(sys.argv) !=3D 2: print("syntax: %s QMP-SOCK\n\n" % __file__ + "Where QMP-SOCK points to a QEMU process such as\n\n" + " # qemu-system-x86_64 -qmp unix:/tmp/qmp,server,nowait " + @@ -66,7 +66,6 @@ =20 =20 sock =3D sys.argv[1] -cmd =3D sys.argv[2] shell =3D qmp.QEMUMonitorProtocol(sock) shell.connect() =20 --=20 2.31.1 From nobody Fri May 3 21:12:45 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1642811332984167.44522909226828; Fri, 21 Jan 2022 16:28:52 -0800 (PST) Received: from localhost ([::1]:35040 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nB4Gx-0000b1-Jv for importer@patchew.org; Fri, 21 Jan 2022 19:28:51 -0500 Received: from eggs.gnu.org ([209.51.188.92]:39102) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nB3yn-0000q8-8U for qemu-devel@nongnu.org; Fri, 21 Jan 2022 19:10:05 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:24067) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nB3yl-0005Gl-If for qemu-devel@nongnu.org; Fri, 21 Jan 2022 19:10:04 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-655-tODPyVguMNSlZ2TS8ToFhg-1; Fri, 21 Jan 2022 19:10:01 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 86044802925; Sat, 22 Jan 2022 00:10:00 +0000 (UTC) Received: from scv.redhat.com (unknown [10.22.19.60]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7118566E1B; Sat, 22 Jan 2022 00:09:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1642810203; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kTjHzyK3tz3oj/YoCnCRVjFWrdMTMj/5jHiMCQT2E4k=; b=REM9UMzN7S6t3UaGIC2TxNn6UWzNX3CPbI2Qxk7VJmhVvFK4XUhkvTbqtaVipz2U8Lg7SD MTOXY+A8dV+ONbRcA4BUU4UgnfXfm8wDtWBEwxsi2bo/CVwv6/B9vuxZF+XcprxVXr/nic 9HUfRpj6ojJ1NApg00tollW5DutjKvQ= X-MC-Unique: tODPyVguMNSlZ2TS8ToFhg-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PULL 16/17] scripts/cpu-x86-uarch-abi: switch to AQMP Date: Fri, 21 Jan 2022 19:09:30 -0500 Message-Id: <20220122000931.536322-17-jsnow@redhat.com> In-Reply-To: <20220122000931.536322-1-jsnow@redhat.com> References: <20220122000931.536322-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=jsnow@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.699, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , Peter Maydell , Vladimir Sementsov-Ogievskiy , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Beraldo Leal , Markus Armbruster , Cleber Rosa , John Snow Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1642811334655100001 Signed-off-by: John Snow Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Beraldo Leal --- scripts/cpu-x86-uarch-abi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/cpu-x86-uarch-abi.py b/scripts/cpu-x86-uarch-abi.py index 8963d90f0b..c262d2f027 100644 --- a/scripts/cpu-x86-uarch-abi.py +++ b/scripts/cpu-x86-uarch-abi.py @@ -6,7 +6,7 @@ # compatibility levels for each CPU model. # =20 -from qemu import qmp +from qemu.aqmp.legacy import QEMUMonitorProtocol import sys =20 if len(sys.argv) !=3D 2: @@ -66,7 +66,7 @@ =20 =20 sock =3D sys.argv[1] -shell =3D qmp.QEMUMonitorProtocol(sock) +shell =3D QEMUMonitorProtocol(sock) shell.connect() =20 models =3D shell.cmd("query-cpu-definitions") --=20 2.31.1 From nobody Fri May 3 21:12:45 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1642811047529340.39722033465523; Fri, 21 Jan 2022 16:24:07 -0800 (PST) Received: from localhost ([::1]:56028 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nB4CL-0003uN-BT for importer@patchew.org; Fri, 21 Jan 2022 19:24:05 -0500 Received: from eggs.gnu.org ([209.51.188.92]:39174) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nB3yu-0000xY-VU for qemu-devel@nongnu.org; Fri, 21 Jan 2022 19:10:13 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:39077) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nB3yt-0005Qw-Cz for qemu-devel@nongnu.org; Fri, 21 Jan 2022 19:10:12 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-260-y7uo-hiRPLGikqfaF8sa2A-1; Fri, 21 Jan 2022 19:10:07 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A6E3A802925; Sat, 22 Jan 2022 00:10:06 +0000 (UTC) Received: from scv.redhat.com (unknown [10.22.19.60]) by smtp.corp.redhat.com (Postfix) with ESMTP id AD9B066E1B; Sat, 22 Jan 2022 00:10:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1642810210; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=G3Si8WcTdAO8B3/OIKqcvxSkiZilPW9PdfSrSFPyr+A=; b=TdXOgUmNkhnYRUcWh5V2zRJt0ni+0G6hArMIw5YfnWv+Y0aZgmbSYNfoqi0F7HX7mIRmqP 5ADzuOcPQs8aUxVNbndrI4bmFGTPqx6NnuZ/JIel/SX6Yqu7XjMMXgg/tOs4ZNidfLDfiw 02Wh6G9Z1qzXj9HwGDVZPHrGzbYqJDU= X-MC-Unique: y7uo-hiRPLGikqfaF8sa2A-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PULL 17/17] scripts/render-block-graph: switch to AQMP Date: Fri, 21 Jan 2022 19:09:31 -0500 Message-Id: <20220122000931.536322-18-jsnow@redhat.com> In-Reply-To: <20220122000931.536322-1-jsnow@redhat.com> References: <20220122000931.536322-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=jsnow@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.699, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , Peter Maydell , Vladimir Sementsov-Ogievskiy , Beraldo Leal , Markus Armbruster , Cleber Rosa , John Snow Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1642811049674100001 Content-Type: text/plain; charset="utf-8" Creating an instance of qemu.aqmp.ExecuteError is too involved here, so just drop the specificity down to a generic QMPError. Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Beraldo Leal --- scripts/render_block_graph.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/scripts/render_block_graph.py b/scripts/render_block_graph.py index 42288a3cfb..b33fb70d5e 100755 --- a/scripts/render_block_graph.py +++ b/scripts/render_block_graph.py @@ -25,10 +25,8 @@ from graphviz import Digraph =20 sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'python')) -from qemu.qmp import ( - QEMUMonitorProtocol, - QMPResponseError, -) +from qemu.aqmp import QMPError +from qemu.aqmp.legacy import QEMUMonitorProtocol =20 =20 def perm(arr): @@ -104,7 +102,7 @@ def command(self, cmd): reply =3D json.loads(subprocess.check_output(ar)) =20 if 'error' in reply: - raise QMPResponseError(reply) + raise QMPError(reply) =20 return reply['return'] =20 --=20 2.31.1