From nobody Sun Feb 8 11:40:42 2026 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 ARC-Seal: i=1; a=rsa-sha256; t=1613676669; cv=none; d=zohomail.com; s=zohoarc; b=bVLlsa+8r1ZlUnh0DgG+CamFYyJpDb8GyQwNtOiQi3UF97Pyk5v0cPGjMmUV6cVBNXzOF/a0ZL+BY9S6LybKTeTf4hdnszjXx1+IlgYpbb3qtRfQ5AUmYHcvTnKLBngppnK7MWetUyOg+nwjf/4x+jfBb5etrLrPpAUl6Lt9CV8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613676669; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=0Z/lF+xzomFC0LFn2cOBVfvkyFtl6O8Zp6UcXT4MHWI=; b=KkcRL4zPr9NO9vstQRS07YkOrl8Ylf4LZfOw/nqu/F9y9ms0C7iGc8CgYCYSbnghDv45N2fKFpk5GVi8pQjnA32KGYnAmdf6TvWCsRHZBgX73IHqE9CgVk7ZX/WzSXYnrDkqU6VrrodshqTZsQ42YVDGky+zRzwsI8wzMJZysm0= ARC-Authentication-Results: i=1; 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 header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1613676669141748.4679105008827; Thu, 18 Feb 2021 11:31:09 -0800 (PST) Received: from localhost ([::1]:60410 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lCp10-0004VY-Qp for importer@patchew.org; Thu, 18 Feb 2021 14:31:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34832) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lCoxn-0002Ga-Sy for qemu-devel@nongnu.org; Thu, 18 Feb 2021 14:27:47 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:38803) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lCoxl-0003MB-OL for qemu-devel@nongnu.org; Thu, 18 Feb 2021 14:27:46 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-577-Il0R5wuYO5ywRECHu8l_UA-1; Thu, 18 Feb 2021 14:27:41 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E54AF18A2AD2; Thu, 18 Feb 2021 19:27:39 +0000 (UTC) Received: from scv.redhat.com (ovpn-112-247.rdu2.redhat.com [10.10.112.247]) by smtp.corp.redhat.com (Postfix) with ESMTP id A11DB60BF1; Thu, 18 Feb 2021 19:27:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613676464; 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=0Z/lF+xzomFC0LFn2cOBVfvkyFtl6O8Zp6UcXT4MHWI=; b=cLOfh3r6H36FYNa4Jn0b8x+9N1y/XxyZ/MzckmWqXl4icdn4EJAUd+CJ4T1SDQ3Zq7lm8A 7WsChRo/BTW71sLb+GT8qYyosTUFFmlaWsnKCLgAuX36bCXgG1M5SZv7SQcXuMmkZ2xHAq fDAMug5R+LEh/xGj8aVJokn6VIzXizQ= X-MC-Unique: Il0R5wuYO5ywRECHu8l_UA-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v5 01/25] python/console_socket: avoid one-letter variable Date: Thu, 18 Feb 2021 14:27:09 -0500 Message-Id: <20210218192733.370968-2-jsnow@redhat.com> In-Reply-To: <20210218192733.370968-1-jsnow@redhat.com> References: <20210218192733.370968-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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=216.205.24.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Kevin Wolf , Thomas Huth , Beraldo Leal , qemu-block@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Max Reitz , Willian Rampazzo , Cleber Rosa , John Snow , Eduardo Habkost Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Fixes pylint warnings. Signed-off-by: John Snow Reviewed-by: Cleber Rosa --- python/qemu/console_socket.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/python/qemu/console_socket.py b/python/qemu/console_socket.py index ac21130e446..87237bebef7 100644 --- a/python/qemu/console_socket.py +++ b/python/qemu/console_socket.py @@ -46,11 +46,11 @@ def __init__(self, address: str, file: Optional[str] = =3D None, self._drain_thread =3D self._thread_start() =20 def __repr__(self) -> str: - s =3D super().__repr__() - s =3D s.rstrip(">") - s =3D "%s, logfile=3D%s, drain_thread=3D%s>" % (s, self._logfile, - self._drain_thread) - return s + tmp =3D super().__repr__() + tmp =3D tmp.rstrip(">") + tmp =3D "%s, logfile=3D%s, drain_thread=3D%s>" % (tmp, self._logf= ile, + self._drain_thread) + return tmp =20 def _drain_fn(self) -> None: """Drains the socket and runs while the socket is open.""" --=20 2.29.2 From nobody Sun Feb 8 11:40:42 2026 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 1613676718352695.7929123884044; Thu, 18 Feb 2021 11:31:58 -0800 (PST) Received: from localhost ([::1]:33384 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lCp1p-00055Z-4K for importer@patchew.org; Thu, 18 Feb 2021 14:31:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34918) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lCoxs-0002Nf-R9 for qemu-devel@nongnu.org; Thu, 18 Feb 2021 14:27:52 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:48486) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lCoxp-0003PM-SW for qemu-devel@nongnu.org; Thu, 18 Feb 2021 14:27:52 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-269-aXP18-IlMlqlrOPYSwjtSw-1; Thu, 18 Feb 2021 14:27:45 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 397CC107ACF6; Thu, 18 Feb 2021 19:27:44 +0000 (UTC) Received: from scv.redhat.com (ovpn-112-247.rdu2.redhat.com [10.10.112.247]) by smtp.corp.redhat.com (Postfix) with ESMTP id 14C7D60BF3; Thu, 18 Feb 2021 19:27:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613676469; 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=n9+e/NCTFNjbPTjtsMV5Rko0yUbnj4hp2BxJJ6lN/Mo=; b=CFdsEns7DfJDrGWsSwpmgxGNP4mapt8x3vCNdGfzEfPMgrcCboYxX5OQ0g2wY1djorKfVB oaqNozGIraSzg5gbiIpRbE5vgos/Y+35U5LClos/EhoqV4zReDfk9Bt8XxTqfIxtQbI8xm OeocnaqahZbD4rJtAG2EibsKcJxHnhg= X-MC-Unique: aXP18-IlMlqlrOPYSwjtSw-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v5 02/25] iotests/297: add --namespace-packages to mypy arguments Date: Thu, 18 Feb 2021 14:27:10 -0500 Message-Id: <20210218192733.370968-3-jsnow@redhat.com> In-Reply-To: <20210218192733.370968-1-jsnow@redhat.com> References: <20210218192733.370968-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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=216.205.24.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Kevin Wolf , Thomas Huth , Beraldo Leal , qemu-block@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Max Reitz , Willian Rampazzo , Cleber Rosa , John Snow , Eduardo Habkost Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" mypy is kind of weird about how it handles imports. For legacy reasons, it won't load PEP 420 namespaces, because of logic implemented prior to that becoming a standard. So, if you plan on using any, you have to pass --namespace-packages. Alright, fine. Signed-off-by: John Snow Reviewed-by: Cleber Rosa --- tests/qemu-iotests/297 | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qemu-iotests/297 b/tests/qemu-iotests/297 index a37910b42d9..433b7323368 100755 --- a/tests/qemu-iotests/297 +++ b/tests/qemu-iotests/297 @@ -95,6 +95,7 @@ def run_linters(): '--warn-redundant-casts', '--warn-unused-ignores', '--no-implicit-reexport', + '--namespace-packages', filename), env=3Denv, check=3DFalse, --=20 2.29.2 From nobody Sun Feb 8 11:40:42 2026 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 1613676974065193.37716058302988; Thu, 18 Feb 2021 11:36:14 -0800 (PST) Received: from localhost ([::1]:42712 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lCp5w-0000rH-Jx for importer@patchew.org; Thu, 18 Feb 2021 14:36:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34970) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lCoxv-0002T5-KQ for qemu-devel@nongnu.org; Thu, 18 Feb 2021 14:27:55 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:24919) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lCoxp-0003PQ-SM for qemu-devel@nongnu.org; Thu, 18 Feb 2021 14:27:55 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-91-J1LCKulnP62jfHDaOvaCGQ-1; Thu, 18 Feb 2021 14:27:46 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9F8A0801979; Thu, 18 Feb 2021 19:27:45 +0000 (UTC) Received: from scv.redhat.com (ovpn-112-247.rdu2.redhat.com [10.10.112.247]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5BDC060BE5; Thu, 18 Feb 2021 19:27:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613676469; 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=be3Sv/2kHSvN7HIvgnvUCaM9DG7D4I+h3KaDoOuXI2U=; b=WlWC++WAU49KO+eqc9XvKeC5HFolYPYFbKH6xr7qNnKK/cis1QPKb9xIQ89kFrj0TBW9E9 ETOOij6USsaRFSGsDu3IcUzrrqqfaGjbFa09cYb0n9ZBhXcsixLgrJDWpm4dXDZM8pe+c3 fykKRL8WIx4Oyyta1mhKMIoqn8Z4vZE= X-MC-Unique: J1LCKulnP62jfHDaOvaCGQ-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v5 03/25] python: create qemu packages Date: Thu, 18 Feb 2021 14:27:11 -0500 Message-Id: <20210218192733.370968-4-jsnow@redhat.com> In-Reply-To: <20210218192733.370968-1-jsnow@redhat.com> References: <20210218192733.370968-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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=216.205.24.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Kevin Wolf , Thomas Huth , Beraldo Leal , qemu-block@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Max Reitz , Willian Rampazzo , Cleber Rosa , John Snow , Eduardo Habkost Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" move python/qemu/*.py to python/qemu/[machine, qmp]/*.py and update import directives across the tree. This is done to create a PEP420 namespace package, in which we may create subpackages. To do this, the namespace directory ("qemu") should not have any modules in it. Those files will go into new 'machine' and 'qmp' subpackages instead. Implement machine/__init__.py making the top-level classes and functions from its various modules available directly inside the package. Change qmp.py to qmp/__init__.py similarly, such that all of the useful QMP library classes are available directly from "qemu.qmp" instead of "qemu.qmp.qmp". Signed-off-by: John Snow --- Note for reviewers: in the next patch, I add a utils sub-package and move qemu/machine/accel.py to qemu/utils/accel.py. If we like it that way, we can squash it in here if we want, or just leave it as its own follow-up patch, I am just leaving it as something that will be easy to un-do or change for now. Signed-off-by: John Snow --- python/{qemu =3D> }/.isort.cfg | 0 python/qemu/__init__.py | 11 ------ python/qemu/{ =3D> machine}/.flake8 | 0 python/qemu/machine/__init__.py | 41 +++++++++++++++++++++ python/qemu/{ =3D> machine}/accel.py | 0 python/qemu/{ =3D> machine}/console_socket.py | 0 python/qemu/{ =3D> machine}/machine.py | 16 +++++--- python/qemu/{ =3D> machine}/pylintrc | 0 python/qemu/{ =3D> machine}/qtest.py | 3 +- python/qemu/{qmp.py =3D> qmp/__init__.py} | 12 +++++- tests/acceptance/avocado_qemu/__init__.py | 4 +- tests/acceptance/virtio-gpu.py | 2 +- tests/qemu-iotests/300 | 4 +- tests/qemu-iotests/iotests.py | 2 +- tests/vm/aarch64vm.py | 2 +- tests/vm/basevm.py | 3 +- 16 files changed, 73 insertions(+), 27 deletions(-) rename python/{qemu =3D> }/.isort.cfg (100%) delete mode 100644 python/qemu/__init__.py rename python/qemu/{ =3D> machine}/.flake8 (100%) create mode 100644 python/qemu/machine/__init__.py rename python/qemu/{ =3D> machine}/accel.py (100%) rename python/qemu/{ =3D> machine}/console_socket.py (100%) rename python/qemu/{ =3D> machine}/machine.py (98%) rename python/qemu/{ =3D> machine}/pylintrc (100%) rename python/qemu/{ =3D> machine}/qtest.py (99%) rename python/qemu/{qmp.py =3D> qmp/__init__.py} (96%) diff --git a/python/qemu/.isort.cfg b/python/.isort.cfg similarity index 100% rename from python/qemu/.isort.cfg rename to python/.isort.cfg diff --git a/python/qemu/__init__.py b/python/qemu/__init__.py deleted file mode 100644 index 4ca06c34a41..00000000000 --- a/python/qemu/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -# QEMU library -# -# Copyright (C) 2015-2016 Red Hat Inc. -# Copyright (C) 2012 IBM Corp. -# -# Authors: -# Fam Zheng -# -# This work is licensed under the terms of the GNU GPL, version 2. See -# the COPYING file in the top-level directory. -# diff --git a/python/qemu/.flake8 b/python/qemu/machine/.flake8 similarity index 100% rename from python/qemu/.flake8 rename to python/qemu/machine/.flake8 diff --git a/python/qemu/machine/__init__.py b/python/qemu/machine/__init__= .py new file mode 100644 index 00000000000..0ac6c1e36e3 --- /dev/null +++ b/python/qemu/machine/__init__.py @@ -0,0 +1,41 @@ +""" +QEMU development and testing library. + +This library provides a few high-level classes for driving QEMU from a +test suite, not intended for production use. + +- QEMUMachine: Configure and Boot a QEMU VM + - QEMUQtestMachine: VM class, with a qtest socket. + +- QEMUQtestProtocol: Connect to, send/receive qtest messages. + +- list_accel: List available accelerators +- kvm_available: Probe for KVM support +- tcg_available: Probe for TCG support +""" + +# Copyright (C) 2020-2021 John Snow for Red Hat Inc. +# Copyright (C) 2015-2016 Red Hat Inc. +# Copyright (C) 2012 IBM Corp. +# +# Authors: +# John Snow +# Fam Zheng +# +# This work is licensed under the terms of the GNU GPL, version 2. See +# the COPYING file in the top-level directory. +# + +from .accel import kvm_available, list_accel, tcg_available +from .machine import QEMUMachine +from .qtest import QEMUQtestMachine, QEMUQtestProtocol + + +__all__ =3D ( + 'list_accel', + 'kvm_available', + 'tcg_available', + 'QEMUMachine', + 'QEMUQtestProtocol', + 'QEMUQtestMachine', +) diff --git a/python/qemu/accel.py b/python/qemu/machine/accel.py similarity index 100% rename from python/qemu/accel.py rename to python/qemu/machine/accel.py diff --git a/python/qemu/console_socket.py b/python/qemu/machine/console_so= cket.py similarity index 100% rename from python/qemu/console_socket.py rename to python/qemu/machine/console_socket.py diff --git a/python/qemu/machine.py b/python/qemu/machine/machine.py similarity index 98% rename from python/qemu/machine.py rename to python/qemu/machine/machine.py index 6e44bda337e..cc0d2bb23f9 100644 --- a/python/qemu/machine.py +++ b/python/qemu/machine/machine.py @@ -38,8 +38,14 @@ Type, ) =20 -from . import console_socket, qmp -from .qmp import QMPMessage, QMPReturnValue, SocketAddrT +from qemu.qmp import ( + QEMUMonitorProtocol, + QMPMessage, + QMPReturnValue, + SocketAddrT, +) + +from . import console_socket =20 =20 LOG =3D logging.getLogger(__name__) @@ -139,7 +145,7 @@ def __init__(self, self._events: List[QMPMessage] =3D [] self._iolog: Optional[str] =3D None self._qmp_set =3D True # Enable QMP monitor by default. - self._qmp_connection: Optional[qmp.QEMUMonitorProtocol] =3D None + self._qmp_connection: Optional[QEMUMonitorProtocol] =3D None self._qemu_full_args: Tuple[str, ...] =3D () self._temp_dir: Optional[str] =3D None self._launched =3D False @@ -315,7 +321,7 @@ def _pre_launch(self) -> None: if self._remove_monitor_sockfile: assert isinstance(self._monitor_address, str) self._remove_files.append(self._monitor_address) - self._qmp_connection =3D qmp.QEMUMonitorProtocol( + self._qmp_connection =3D QEMUMonitorProtocol( self._monitor_address, server=3DTrue, nickname=3Dself._name @@ -535,7 +541,7 @@ def set_qmp_monitor(self, enabled: bool =3D True) -> No= ne: self._qmp_set =3D enabled =20 @property - def _qmp(self) -> qmp.QEMUMonitorProtocol: + def _qmp(self) -> QEMUMonitorProtocol: if self._qmp_connection is None: raise QEMUMachineError("Attempt to access QMP with no connecti= on") return self._qmp_connection diff --git a/python/qemu/pylintrc b/python/qemu/machine/pylintrc similarity index 100% rename from python/qemu/pylintrc rename to python/qemu/machine/pylintrc diff --git a/python/qemu/qtest.py b/python/qemu/machine/qtest.py similarity index 99% rename from python/qemu/qtest.py rename to python/qemu/machine/qtest.py index 39a0cf62fe9..53926e434a7 100644 --- a/python/qemu/qtest.py +++ b/python/qemu/machine/qtest.py @@ -26,8 +26,9 @@ TextIO, ) =20 +from qemu.qmp import SocketAddrT + from .machine import QEMUMachine -from .qmp import SocketAddrT =20 =20 class QEMUQtestProtocol: diff --git a/python/qemu/qmp.py b/python/qemu/qmp/__init__.py similarity index 96% rename from python/qemu/qmp.py rename to python/qemu/qmp/__init__.py index 2cd4d43036c..9606248a3d2 100644 --- a/python/qemu/qmp.py +++ b/python/qemu/qmp/__init__.py @@ -1,4 +1,14 @@ -""" QEMU Monitor Protocol Python class """ +""" +QEMU Monitor Protocol (QMP) development library & tooling. + +This package provides a fairly low-level class for communicating to QMP +protocol servers, as implemented by QEMU, the QEMU Guest Agent, and the +QEMU Storage Daemon. This library is not intended for production use. + +`QEMUMonitorProtocol` is the primary class of interest, and all errors +raised derive from `QMPError`. +""" + # Copyright (C) 2009, 2010 Red Hat Inc. # # Authors: diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/a= vocado_qemu/__init__.py index df167b142cc..cdd597ae0c4 100644 --- a/tests/acceptance/avocado_qemu/__init__.py +++ b/tests/acceptance/avocado_qemu/__init__.py @@ -40,9 +40,9 @@ =20 sys.path.append(os.path.join(SOURCE_DIR, 'python')) =20 -from qemu.accel import kvm_available -from qemu.accel import tcg_available from qemu.machine import QEMUMachine +from qemu.machine import kvm_available +from qemu.machine import tcg_available =20 def is_readable_executable_file(path): return os.path.isfile(path) and os.access(path, os.R_OK | os.X_OK) diff --git a/tests/acceptance/virtio-gpu.py b/tests/acceptance/virtio-gpu.py index ab1a4c1a718..a2f044d3f00 100644 --- a/tests/acceptance/virtio-gpu.py +++ b/tests/acceptance/virtio-gpu.py @@ -10,7 +10,7 @@ from avocado_qemu import exec_command_and_wait_for_pattern from avocado_qemu import is_readable_executable_file =20 -from qemu.accel import kvm_available +from qemu.machine import kvm_available =20 import os import socket diff --git a/tests/qemu-iotests/300 b/tests/qemu-iotests/300 index 63036f6a6e1..5b9883bd950 100755 --- a/tests/qemu-iotests/300 +++ b/tests/qemu-iotests/300 @@ -28,7 +28,7 @@ import iotests =20 # Import qemu after iotests.py has amended sys.path # pylint: disable=3Dwrong-import-order -import qemu +from qemu.machine import machine =20 BlockBitmapMapping =3D List[Dict[str, Union[str, List[Dict[str, str]]]]] =20 @@ -466,7 +466,7 @@ class TestBlockBitmapMappingErrors(TestDirtyBitmapMigra= tion): # the failed migration try: self.vm_b.shutdown() - except qemu.machine.AbnormalShutdown: + except machine.AbnormalShutdown: pass =20 def test_aliased_bitmap_name_too_long(self) -> None: diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 4e758308f24..0bfcb03508a 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -37,7 +37,7 @@ =20 # pylint: disable=3Dimport-error, wrong-import-position sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'pytho= n')) -from qemu import qtest +from qemu.machine import qtest from qemu.qmp import QMPMessage =20 # Use this logger for logging messages directly from the iotests module diff --git a/tests/vm/aarch64vm.py b/tests/vm/aarch64vm.py index d70ab843b6b..39ff99b0859 100644 --- a/tests/vm/aarch64vm.py +++ b/tests/vm/aarch64vm.py @@ -14,7 +14,7 @@ import sys import subprocess import basevm -from qemu.accel import kvm_available +from qemu.machine import kvm_available =20 # This is the config needed for current version of QEMU. # This works for both kvm and tcg. diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 00f1d5ca8da..12d08cf2b1b 100644 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -19,8 +19,7 @@ import time import datetime sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'pytho= n')) -from qemu.accel import kvm_available -from qemu.machine import QEMUMachine +from qemu.machine import kvm_available, QEMUMachine import subprocess import hashlib import argparse --=20 2.29.2 From nobody Sun Feb 8 11:40:42 2026 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 1613677159163432.57424532959476; Thu, 18 Feb 2021 11:39:19 -0800 (PST) Received: from localhost ([::1]:49766 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lCp8v-000462-Rj for importer@patchew.org; Thu, 18 Feb 2021 14:39:17 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34956) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lCoxu-0002RI-SL for qemu-devel@nongnu.org; Thu, 18 Feb 2021 14:27:54 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:30253) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lCoxs-0003RE-Pd for qemu-devel@nongnu.org; Thu, 18 Feb 2021 14:27:54 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-449-mR-RpdAnObueMoOIHEXWqg-1; Thu, 18 Feb 2021 14:27:48 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 10B1E80196C; Thu, 18 Feb 2021 19:27:47 +0000 (UTC) Received: from scv.redhat.com (ovpn-112-247.rdu2.redhat.com [10.10.112.247]) by smtp.corp.redhat.com (Postfix) with ESMTP id C202560BE5; Thu, 18 Feb 2021 19:27:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613676472; 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=eCktBe60QT28m3wZtekksBElR167ZW94IifUBB8Ps04=; b=g4WcBhc6p074s54O+2svcYOzg6NUp9Z4vtRUC6ljsIFzqY3IVBFRtuvY8TGORfG28UTN1W 6H98PWRQe0Juutnb2/y+eU2qqetgG+egcyt0088v5oRdkNgQMFCT0r35+hHeS7SGsZAezM 86OOAVWumrF21HphAZS+v9o/B95E3aU= X-MC-Unique: mR-RpdAnObueMoOIHEXWqg-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v5 04/25] python: create utils sub-package Date: Thu, 18 Feb 2021 14:27:12 -0500 Message-Id: <20210218192733.370968-5-jsnow@redhat.com> In-Reply-To: <20210218192733.370968-1-jsnow@redhat.com> References: <20210218192733.370968-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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=216.205.24.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Kevin Wolf , Thomas Huth , Beraldo Leal , qemu-block@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Max Reitz , Willian Rampazzo , Cleber Rosa , John Snow , Eduardo Habkost Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Create a space for miscellaneous things that don't belong strictly in "qemu.machine" nor "qemu.qmp" packages. Signed-off-by: John Snow --- python/qemu/machine/__init__.py | 8 -------- python/qemu/utils/__init__.py | 23 +++++++++++++++++++++++ python/qemu/{machine =3D> utils}/accel.py | 0 tests/acceptance/avocado_qemu/__init__.py | 4 ++-- tests/acceptance/virtio-gpu.py | 2 +- tests/vm/aarch64vm.py | 2 +- tests/vm/basevm.py | 3 ++- 7 files changed, 29 insertions(+), 13 deletions(-) create mode 100644 python/qemu/utils/__init__.py rename python/qemu/{machine =3D> utils}/accel.py (100%) diff --git a/python/qemu/machine/__init__.py b/python/qemu/machine/__init__= .py index 0ac6c1e36e3..98302ea31e7 100644 --- a/python/qemu/machine/__init__.py +++ b/python/qemu/machine/__init__.py @@ -8,10 +8,6 @@ - QEMUQtestMachine: VM class, with a qtest socket. =20 - QEMUQtestProtocol: Connect to, send/receive qtest messages. - -- list_accel: List available accelerators -- kvm_available: Probe for KVM support -- tcg_available: Probe for TCG support """ =20 # Copyright (C) 2020-2021 John Snow for Red Hat Inc. @@ -26,15 +22,11 @@ # the COPYING file in the top-level directory. # =20 -from .accel import kvm_available, list_accel, tcg_available from .machine import QEMUMachine from .qtest import QEMUQtestMachine, QEMUQtestProtocol =20 =20 __all__ =3D ( - 'list_accel', - 'kvm_available', - 'tcg_available', 'QEMUMachine', 'QEMUQtestProtocol', 'QEMUQtestMachine', diff --git a/python/qemu/utils/__init__.py b/python/qemu/utils/__init__.py new file mode 100644 index 00000000000..edf807a93e5 --- /dev/null +++ b/python/qemu/utils/__init__.py @@ -0,0 +1,23 @@ +""" +QEMU development and testing utilities + +This library provides a small handful of utilities for performing various = tasks +not directly related to the launching of a VM. + +The only module included at present is accel; its public functions are +repeated here for your convenience: + +- list_accel: List available accelerators +- kvm_available: Probe for KVM support +- tcg_available: Prove for TCG support +""" + +# pylint: disable=3Dimport-error +from .accel import kvm_available, list_accel, tcg_available + + +__all__ =3D ( + 'list_accel', + 'kvm_available', + 'tcg_available', +) diff --git a/python/qemu/machine/accel.py b/python/qemu/utils/accel.py similarity index 100% rename from python/qemu/machine/accel.py rename to python/qemu/utils/accel.py diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/a= vocado_qemu/__init__.py index cdd597ae0c4..5e072e738cf 100644 --- a/tests/acceptance/avocado_qemu/__init__.py +++ b/tests/acceptance/avocado_qemu/__init__.py @@ -41,8 +41,8 @@ sys.path.append(os.path.join(SOURCE_DIR, 'python')) =20 from qemu.machine import QEMUMachine -from qemu.machine import kvm_available -from qemu.machine import tcg_available +from qemu.utils import kvm_available +from qemu.utils import tcg_available =20 def is_readable_executable_file(path): return os.path.isfile(path) and os.access(path, os.R_OK | os.X_OK) diff --git a/tests/acceptance/virtio-gpu.py b/tests/acceptance/virtio-gpu.py index a2f044d3f00..7023c0953db 100644 --- a/tests/acceptance/virtio-gpu.py +++ b/tests/acceptance/virtio-gpu.py @@ -10,7 +10,7 @@ from avocado_qemu import exec_command_and_wait_for_pattern from avocado_qemu import is_readable_executable_file =20 -from qemu.machine import kvm_available +from qemu.utils import kvm_available =20 import os import socket diff --git a/tests/vm/aarch64vm.py b/tests/vm/aarch64vm.py index 39ff99b0859..b00cce07eb8 100644 --- a/tests/vm/aarch64vm.py +++ b/tests/vm/aarch64vm.py @@ -14,7 +14,7 @@ import sys import subprocess import basevm -from qemu.machine import kvm_available +from qemu.utils import kvm_available =20 # This is the config needed for current version of QEMU. # This works for both kvm and tcg. diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 12d08cf2b1b..a3867fdf88e 100644 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -19,7 +19,8 @@ import time import datetime sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'pytho= n')) -from qemu.machine import kvm_available, QEMUMachine +from qemu.machine import QEMUMachine +from qemu.utils import kvm_available import subprocess import hashlib import argparse --=20 2.29.2 From nobody Sun Feb 8 11:40:42 2026 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 ARC-Seal: i=1; a=rsa-sha256; t=1613677232; cv=none; d=zohomail.com; s=zohoarc; b=mPMAwBsiSaqC+TUlPrs3blecKATOeDg4nTTCun++r0XhZPkUBFoSDdCVv48K4D6sJ07eBCTUXwiN/2ETRyg/a+E8B1hdTX8o7sisZsxMHj6vMvYvdaZACo4Xb8e1WMR+Liww7xtMIcUY/U7SRgOvEJyEvPNfsYYmoITNZuhCpnc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613677232; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=j5O0AFoUcMFdk+/23x9DeC0Czs79vDJW5fAx2sUdtSY=; b=mNutsN/MCd/s8pTxYbpkJq4aAEEid7eBFRZAlG5p5iIsZmiqlF+qsLvbKFlzQ7rJDBRbPa0A+VLQqp2fVxoHPS3Yn7HE1klui9cS64iWNv0UpsESYJVTT/Uv9Mv1MHjBhYlzY+BqqU0kex3O0bg4oF3BLUNJE2ForgGkGYDtAyE= ARC-Authentication-Results: i=1; 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 header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1613677231826184.03618452982005; Thu, 18 Feb 2021 11:40:31 -0800 (PST) Received: from localhost ([::1]:52152 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lCpA6-0005JQ-KC for importer@patchew.org; Thu, 18 Feb 2021 14:40:30 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34992) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lCoxx-0002Wr-KR for qemu-devel@nongnu.org; Thu, 18 Feb 2021 14:27:57 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:24766) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lCoxu-0003Rr-FF for qemu-devel@nongnu.org; Thu, 18 Feb 2021 14:27:57 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-280-5NhpK4aVOe-8u6VHTfhdTg-1; Thu, 18 Feb 2021 14:27:49 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 75C9784E240; Thu, 18 Feb 2021 19:27:48 +0000 (UTC) Received: from scv.redhat.com (ovpn-112-247.rdu2.redhat.com [10.10.112.247]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3010860BE5; Thu, 18 Feb 2021 19:27:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613676473; 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=j5O0AFoUcMFdk+/23x9DeC0Czs79vDJW5fAx2sUdtSY=; b=f3HEGyZOsPELhyq3+FVbmLjrI+wWGCOFxSANArZNCxNXpVBnJj4l3PqHV7UQZN1ke9JQjZ ZNTtQxRKDDSVFZxElrTgh88WLX4gvttmrsOgG7MsvtBa981HBls1MHW78pZAdih/W9PLEu aIUD0cqjEvYCylvvcENDsJXAdlzBqS4= X-MC-Unique: 5NhpK4aVOe-8u6VHTfhdTg-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v5 05/25] python: add qemu package installer Date: Thu, 18 Feb 2021 14:27:13 -0500 Message-Id: <20210218192733.370968-6-jsnow@redhat.com> In-Reply-To: <20210218192733.370968-1-jsnow@redhat.com> References: <20210218192733.370968-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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=63.128.21.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Kevin Wolf , Thomas Huth , Beraldo Leal , qemu-block@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Max Reitz , Willian Rampazzo , Cleber Rosa , John Snow , Eduardo Habkost Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Add setup.cfg and setup.py, necessary for installing a package via pip. Add a ReST document (PACKAGE.rst) explaining the basics of what this package is for and who to contact for more information. This document will be used as the landing page for the package on PyPI. I am not yet using a pyproject.toml style package manifest, because "editable" installs are not defined (yet?) by PEP-517/518. I consider editable installs crucial for development, though they have (apparently) always been somewhat poorly defined. Pip now (19.2 and later) now supports editable installs for projects using pyproject.toml manifests, but might require the use of the --no-use-pep517 flag, which somewhat defeats the point. For now, while the dust settles, stick with the de-facto setup.py/setup.cfg combination supported by setuptools. It will be worth re-evaluating this point again in the future when our supported build platforms all ship a fairly modern pip. Additional reading on this matter: https://github.com/pypa/packaging-problems/issues/256 https://github.com/pypa/pip/issues/6334 https://github.com/pypa/pip/issues/6375 https://github.com/pypa/pip/issues/6434 https://github.com/pypa/pip/issues/6438 Signed-off-by: John Snow --- python/PACKAGE.rst | 32 ++++++++++++++++++++++++++++++++ python/setup.cfg | 19 +++++++++++++++++++ python/setup.py | 23 +++++++++++++++++++++++ 3 files changed, 74 insertions(+) create mode 100644 python/PACKAGE.rst create mode 100644 python/setup.cfg create mode 100755 python/setup.py diff --git a/python/PACKAGE.rst b/python/PACKAGE.rst new file mode 100644 index 00000000000..0e714c87eb3 --- /dev/null +++ b/python/PACKAGE.rst @@ -0,0 +1,32 @@ +QEMU Python Tooling +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +This package provides QEMU tooling used by the QEMU project to build, +configure, and test QEMU. It is not a fully-fledged SDK and it is subject +to change at any time. + +Usage +----- + +The ``qemu.qmp`` subpackage provides a library for communicating with +QMP servers. The ``qemu.machine`` subpackage offers rudimentary +facilities for launching and managing QEMU processes. Refer to each +package's documentation +(``>>> help(qemu.qmp)``, ``>>> help(qemu.machine)``) +for more information. + +Contributing +------------ + +This package is maintained by John Snow as part of +the QEMU source tree. Contributions are welcome and follow the `QEMU +patch submission process +`_, which involves +sending patches to the QEMU development mailing list. + +John maintains a `GitLab staging branch +`_, and there is an +official `GitLab mirror `_. + +Please report bugs by sending a mail to qemu-devel@nongnu.org and CC +jsnow@redhat.com. diff --git a/python/setup.cfg b/python/setup.cfg new file mode 100644 index 00000000000..dd71640fc2f --- /dev/null +++ b/python/setup.cfg @@ -0,0 +1,19 @@ +[metadata] +name =3D qemu +maintainer =3D QEMU Developer Team +maintainer_email =3D qemu-devel@nongnu.org +url =3D https://www.qemu.org/ +download_url =3D https://www.qemu.org/download/ +description =3D QEMU Python Build, Debug and SDK tooling. +long_description =3D file:PACKAGE.rst +long_description_content_type =3D text/x-rst +classifiers =3D + Development Status :: 3 - Alpha + License :: OSI Approved :: GNU General Public License v2 (GPLv2) + Natural Language :: English + Operating System :: OS Independent + Programming Language :: Python :: 3 :: Only + +[options] +python_requires =3D >=3D 3.6 +packages =3D find_namespace: diff --git a/python/setup.py b/python/setup.py new file mode 100755 index 00000000000..2014f81b757 --- /dev/null +++ b/python/setup.py @@ -0,0 +1,23 @@ +#!/usr/bin/env python3 +""" +QEMU tooling installer script +Copyright (c) 2020-2021 John Snow for Red Hat, Inc. +""" + +import setuptools +import pkg_resources + + +def main(): + """ + QEMU tooling installer + """ + + # https://medium.com/@daveshawley/safely-using-setup-cfg-for-metadata-= 1babbe54c108 + pkg_resources.require('setuptools>=3D39.2') + + setuptools.setup() + + +if __name__ =3D=3D '__main__': + main() --=20 2.29.2 From nobody Sun Feb 8 11:40:42 2026 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 ARC-Seal: i=1; a=rsa-sha256; t=1613677372; cv=none; d=zohomail.com; s=zohoarc; b=jhHmDCQUdqeWkPqKSZ//LFqyHF9Rsl4pn/6k5P72KClywEpr1PnHDwbNJ+wusQHQ2rsGyNZTp8hNcVlisOyY09kTFDQVyDExWv6lndayXHlzTPbFPOsBLstENm226PwthFHuaUzxijaeNaDYaMME7SgUPHtcmcYa0iASVEyg/DI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613677372; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=qWPwWBtFBaofr0g15BGe8sKLClKTeuug5z36mSUtnEg=; b=URbTi/NBRT6fe0wvBe4nzG14PnuhqQAUawmfyY8zWw5jRByBEuH/0uZhhqgtt5mX6Or/bykBXf0AFTQISU92VX1TsEFrh2pLbQRFaxI7Of/lkjthRjoSw4uolVpwDo6PFei5ACZv+FZ7q+uNqa3vLQjGvv75Qhq2QeqqH+YiblY= ARC-Authentication-Results: i=1; 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 header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1613677372348859.1090078893038; Thu, 18 Feb 2021 11:42:52 -0800 (PST) Received: from localhost ([::1]:57702 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lCpCN-0007o7-4k for importer@patchew.org; Thu, 18 Feb 2021 14:42:51 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35014) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lCoxz-0002aa-6x for qemu-devel@nongnu.org; Thu, 18 Feb 2021 14:27:59 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:60145) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lCoxw-0003Tc-Uk for qemu-devel@nongnu.org; Thu, 18 Feb 2021 14:27:58 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-140-5MeXeGsxNwWcKuuQODB98A-1; Thu, 18 Feb 2021 14:27:54 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E8ED01020C20; Thu, 18 Feb 2021 19:27:52 +0000 (UTC) Received: from scv.redhat.com (ovpn-112-247.rdu2.redhat.com [10.10.112.247]) by smtp.corp.redhat.com (Postfix) with ESMTP id 974B860BE5; Thu, 18 Feb 2021 19:27:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613676476; 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=qWPwWBtFBaofr0g15BGe8sKLClKTeuug5z36mSUtnEg=; b=e7FBRz09XV+pMiAJs9EPb6jfECTmiCFvP92x7dJRPjxbFX3JukqCFFCu7jp3pv1FotyAZ2 KjS2Cu3FxcngFHYRqbguoSfaetC80ZU/eE8fakblDslXv4CKHDlnHGowB3w95TI2HkjR5M jBPyNJLh6oG+WhTxV3r+CjOt0oZGRLc= X-MC-Unique: 5MeXeGsxNwWcKuuQODB98A-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v5 06/25] python: add VERSION file Date: Thu, 18 Feb 2021 14:27:14 -0500 Message-Id: <20210218192733.370968-7-jsnow@redhat.com> In-Reply-To: <20210218192733.370968-1-jsnow@redhat.com> References: <20210218192733.370968-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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=63.128.21.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H4=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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Kevin Wolf , Thomas Huth , Beraldo Leal , qemu-block@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Max Reitz , Willian Rampazzo , Cleber Rosa , John Snow , Eduardo Habkost Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Python infrastructure as it exists today is not capable reliably of single-sourcing a package version from a parent directory. The authors of pip are working to correct this, but as of today this is not possible. The problem is that when using pip to build and install a python package, it copies files over to a temporary directory and performs its build there. This loses access to any information in the parent directory, including git itself. Further, Python versions have a standard (PEP 440) that may or may not follow QEMU's versioning. In general, it does; but naturally QEMU does not follow PEP 440. To avoid any automatically-generated conflict, a manual version file is preferred. I am proposing: - Python tooling follows the QEMU version, indirectly, but with a major version of 0 to indicate that the API is not expected to be stable. This would mean version 0.5.2.0, 0.5.1.1, 0.5.3.0, etc. - In the event that a Python package needs to be updated independently of the QEMU version, a pre-release alpha version should be preferred, but *only* after inclusion to the qemu development or stable branches. e.g. 0.5.2.0a1, 0.5.2.0a2, and so on should be preferred prior to 5.2.0's release. - The Python core tooling makes absolutely no version compatibility checks or constraints. It *may* work with releases of QEMU from the past or future, but it is not required to. i.e., "qemu.machine" will, for now, remain in lock-step with QEMU. - We reserve the right to split the qemu package into independently versioned subpackages at a later date. This might allow for us to begin versioning QMP independently from QEMU at a later date, if we so choose. Implement this versioning scheme by adding a VERSION file and setting it to 0.6.0.0a1. Signed-off-by: John Snow Reviewed-by: Cleber Rosa --- python/VERSION | 1 + python/setup.cfg | 1 + 2 files changed, 2 insertions(+) create mode 100644 python/VERSION diff --git a/python/VERSION b/python/VERSION new file mode 100644 index 00000000000..ffc91e96185 --- /dev/null +++ b/python/VERSION @@ -0,0 +1 @@ +0.6.0.0a1 diff --git a/python/setup.cfg b/python/setup.cfg index dd71640fc2f..e7f8ab23815 100644 --- a/python/setup.cfg +++ b/python/setup.cfg @@ -1,5 +1,6 @@ [metadata] name =3D qemu +version =3D file:VERSION maintainer =3D QEMU Developer Team maintainer_email =3D qemu-devel@nongnu.org url =3D https://www.qemu.org/ --=20 2.29.2 From nobody Sun Feb 8 11:40:42 2026 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 ARC-Seal: i=1; a=rsa-sha256; t=1613676742; cv=none; d=zohomail.com; s=zohoarc; b=DO/n5BtuyOIhif+FKpDzC3HrK2ywTewgzeIsq8g/+oMjJ6OgDLwhsfyiS+DqI5KOo1UQWjsk4sv2yLhzZSVal75m7hAGiyAvPCrPoSmXXvFgq7PviIFVWHqlJEcvFoEMHhdJ7GWn3Li+fTOCUMo7haWl5Hp0bEiOqFc7ttQ6sfM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613676742; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=WmdK9O+5CmUgREW72/5XAWU3K5KDWR7Ezym8UDXBwCA=; b=hoNNnqIa88LB7IXQnrDY43wSDWmy8/EeHtgBWar76iaSfVM8f3sk8MqsYGSwmkxjUsctitZYsxKBWsD9b+IddCg6IVsDfDi3zXFeMUcPKgH9pd2VuDlQ32VrAjJlzKtAKdNrOXNS5vstKY/W7BoS4JjqfHcl8OWaLUrrZ2fHBTs= ARC-Authentication-Results: i=1; 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 header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1613676741764140.5879331896674; Thu, 18 Feb 2021 11:32:21 -0800 (PST) Received: from localhost ([::1]:34030 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lCp2C-0005RP-Ju for importer@patchew.org; Thu, 18 Feb 2021 14:32:20 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35080) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lCoy5-0002lb-Ai for qemu-devel@nongnu.org; Thu, 18 Feb 2021 14:28:06 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:23244) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lCoy2-0003WD-Ar for qemu-devel@nongnu.org; Thu, 18 Feb 2021 14:28:05 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-536-1rCK8I8tNMCreQC9vb2wig-1; Thu, 18 Feb 2021 14:27:58 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 30A2E1020C20; Thu, 18 Feb 2021 19:27:57 +0000 (UTC) Received: from scv.redhat.com (ovpn-112-247.rdu2.redhat.com [10.10.112.247]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1624160BE5; Thu, 18 Feb 2021 19:27:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613676481; 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=WmdK9O+5CmUgREW72/5XAWU3K5KDWR7Ezym8UDXBwCA=; b=gQC1NHpjXaOuDKpBIdGKeChCyg4usBaatQIk2LFMGh1S82En5+crmHdTebJusAu5mhSQnA jobB2ch6F/o1/aunFmagIwcB+G3OnYP0PwdXkS/zcQ4/ilP+bV2y09la/p5whXlNLsya6t Z0x9pMKae88s7Rvv5o6tiiAUjj+/OzU= X-MC-Unique: 1rCK8I8tNMCreQC9vb2wig-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v5 07/25] python: add directory structure README.rst files Date: Thu, 18 Feb 2021 14:27:15 -0500 Message-Id: <20210218192733.370968-8-jsnow@redhat.com> In-Reply-To: <20210218192733.370968-1-jsnow@redhat.com> References: <20210218192733.370968-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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=63.128.21.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Kevin Wolf , Thomas Huth , Beraldo Leal , qemu-block@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Max Reitz , Willian Rampazzo , Cleber Rosa , John Snow , Eduardo Habkost Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Add short readmes to python/, python/qemu/, python/qemu/machine, python/qemu/qmp, and python/qemu/utils that explain the directory hierarchy. These readmes are visible when browsing the source on e.g. gitlab/github and are designed to help new developers/users quickly make sense of the source tree. They are not designed for inclusion in a published manual. Signed-off-by: John Snow --- python/README.rst | 41 ++++++++++++++++++++++++++++++++++ python/qemu/README.rst | 8 +++++++ python/qemu/machine/README.rst | 9 ++++++++ python/qemu/qmp/README.rst | 9 ++++++++ python/qemu/utils/README.rst | 7 ++++++ 5 files changed, 74 insertions(+) create mode 100644 python/README.rst create mode 100644 python/qemu/README.rst create mode 100644 python/qemu/machine/README.rst create mode 100644 python/qemu/qmp/README.rst create mode 100644 python/qemu/utils/README.rst diff --git a/python/README.rst b/python/README.rst new file mode 100644 index 00000000000..7a0dc5dff4a --- /dev/null +++ b/python/README.rst @@ -0,0 +1,41 @@ +QEMU Python Tooling +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +This directory houses Python tooling used by the QEMU project to build, +configure, and test QEMU. It is organized by namespace (``qemu``), and +then by package (e.g. ``qemu/machine``, ``qemu/qmp``, etc). + +``setup.py`` is used by ``pip`` to install this tooling to the current +environment. ``setup.cfg`` provides the packaging configuration used by +setup.py in a setuptools specific format. You will generally invoke it +by doing one of the following: + +1. ``pip3 install .`` will install these packages to your current + environment. If you are inside a virtual environment, they will + install there. If you are not, it will attempt to install to the + global environment, which is not recommended. + +2. ``pip3 install --user .`` will install these packages to your user's + local python packages. If you are inside of a virtual environment, + this will fail. + +If you append the ``-e`` argument, pip will install in "editable" mode; +which installs a version of the package that installs a forwarder +pointing to these files, such that the package always reflects the +latest version in your git tree. + +See `Installing packages using pip and virtual environments +`_ +for more information. + + +Files in this directory +----------------------- + +- ``qemu/`` Python package source directory. +- ``PACKAGE.rst`` is used as the README file that is visible on PyPI.org. +- ``README.rst`` you are here! +- ``VERSION`` contains the PEP-440 compliant version used to describe + this package; it is referenced by ``setup.cfg``. +- ``setup.cfg`` houses setuptools package configuration. +- ``setup.py`` is the setuptools installer used by pip; See above. diff --git a/python/qemu/README.rst b/python/qemu/README.rst new file mode 100644 index 00000000000..d04943f526c --- /dev/null +++ b/python/qemu/README.rst @@ -0,0 +1,8 @@ +QEMU Python Namespace +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +This directory serves as the root of a `Python PEP 420 implicit +namespace package `_. + +Each directory below is assumed to be an installable Python package that +is available under the ``qemu.`` namespace. diff --git a/python/qemu/machine/README.rst b/python/qemu/machine/README.rst new file mode 100644 index 00000000000..ac2b4fffb42 --- /dev/null +++ b/python/qemu/machine/README.rst @@ -0,0 +1,9 @@ +qemu.machine package +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +This package provides core utilities used for testing and debugging +QEMU. It is used by the iotests, vm tests, acceptance tests, and several +other utilities in the ./scripts directory. It is not a fully-fledged +SDK and it is subject to change at any time. + +See the documentation in ``__init__.py`` for more information. diff --git a/python/qemu/qmp/README.rst b/python/qemu/qmp/README.rst new file mode 100644 index 00000000000..c21951491cf --- /dev/null +++ b/python/qemu/qmp/README.rst @@ -0,0 +1,9 @@ +qemu.qmp package +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +This package provides a library used for connecting to and communicating +with QMP servers. It is used extensively by iotests, vm tests, +acceptance tests, and other utilities in the ./scripts directory. It is +not a fully-fledged SDK and is subject to change at any time. + +See the documentation in ``__init__.py`` for more information. diff --git a/python/qemu/utils/README.rst b/python/qemu/utils/README.rst new file mode 100644 index 00000000000..975fbf4d7de --- /dev/null +++ b/python/qemu/utils/README.rst @@ -0,0 +1,7 @@ +qemu.utils package +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +This package provides miscellaneous utilities used for testing and +debugging QEMU. It is used primarily by the vm and acceptance tests. + +See the documentation in ``__init__.py`` for more information. --=20 2.29.2 From nobody Sun Feb 8 11:40:42 2026 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 ARC-Seal: i=1; a=rsa-sha256; t=1613677211; cv=none; d=zohomail.com; s=zohoarc; b=OGO2lN3L6k7XDt0SgISbgknm+yUJvH2m6ro76+1v/cIiIcaW/4CJnLR43slisVbs7SJWSgLhvSA9V5oE2RwmN6geALBXvrSLgAbrBYp45gdIMNt5jlGTkMB0acsWeEGvrtjU3hfLxTFv8YhOrVogRGVpIVdlwd6+g4BeUCEyr98= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613677211; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=wFMr1bY4G4B97v5RPtTMvWMLc9bgZ1TzdOffqD9NBXU=; b=cajoJGT48gan5HSHsSl+YZS67gQKjYCo/LTt0Yv6Gpw4djppucqUowuGFve6ddTDbOQm/8wG89wYszsXvGPG0H1Wve6H57Oje35Ko6tYrCxgE/SiwGx01TG644XsGsLt0CONW/jhMRAwRKHKTYe4gkQcc1Q8y/sBDpd+mgsJJMk= ARC-Authentication-Results: i=1; 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 header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1613677211344906.0256911733079; Thu, 18 Feb 2021 11:40:11 -0800 (PST) Received: from localhost ([::1]:51838 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lCp9j-0005BA-3Z for importer@patchew.org; Thu, 18 Feb 2021 14:40:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35184) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lCoyB-0002re-G3 for qemu-devel@nongnu.org; Thu, 18 Feb 2021 14:28:12 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:43422) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lCoy6-0003Y7-Ek for qemu-devel@nongnu.org; Thu, 18 Feb 2021 14:28:11 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-472-c5RSNplNNcyHU1Oy6Koy7w-1; Thu, 18 Feb 2021 14:27:59 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 91F84427C1; Thu, 18 Feb 2021 19:27:58 +0000 (UTC) Received: from scv.redhat.com (ovpn-112-247.rdu2.redhat.com [10.10.112.247]) by smtp.corp.redhat.com (Postfix) with ESMTP id 50CF360BE5; Thu, 18 Feb 2021 19:27:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613676484; 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=wFMr1bY4G4B97v5RPtTMvWMLc9bgZ1TzdOffqD9NBXU=; b=hKnWncH/L+Ct0NdpgXrCPZySAbkBowMdn+0vhz2R2AtbWIRw04vawdCHbpAL6ZrtSqwp+X HTobx5/HAa9dGCR8ZZmws9c9AKue2MHg+jjV7kfJpEjxAxwvEUmpvF7rYkrKdn9yyl6dNO Qs0k3aybaGDtgQTmSTczkhsCsz0Tm7o= X-MC-Unique: c5RSNplNNcyHU1Oy6Koy7w-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v5 08/25] python: Add pipenv support Date: Thu, 18 Feb 2021 14:27:16 -0500 Message-Id: <20210218192733.370968-9-jsnow@redhat.com> In-Reply-To: <20210218192733.370968-1-jsnow@redhat.com> References: <20210218192733.370968-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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=63.128.21.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Kevin Wolf , Thomas Huth , Beraldo Leal , qemu-block@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Max Reitz , Willian Rampazzo , Cleber Rosa , John Snow , Eduardo Habkost Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" pipenv is a tool used for managing virtual environments with pinned, explicit dependencies. It is used for precisely recreating python virtual environments. pipenv uses two files to do this: (1) Pipfile, which is similar in purpose and scope to what setup.py lists. It specifies the requisite minimum to get a functional environment for using this package. (2) Pipfile.lock, which is similar in purpose to `pip freeze > requirements.txt`. It specifies a canonical virtual environment used for deployment or testing. This ensures that all users have repeatable results. The primary benefit of using this tool is to ensure repeatable CI results with a known set of packages. Although I endeavor to support as many versions as I can, the fluid nature of the Python toolchain often means tailoring code for fairly specific versions. Note that pipenv is *not* required to install or use this module; this is purely for the sake of repeatable testing by CI or developers. Here, a "blank" pipfile is added with no dependencies, but specifies Python 3.6 for the virtual environment. Pipfile will specify our version minimums, while Pipfile.lock specifies an exact loadout of packages that were known to operate correctly. This latter file provides the real value for easy setup of container images and CI environments. Signed-off-by: John Snow Reviewed-by: Cleber Rosa --- python/Pipfile | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 python/Pipfile diff --git a/python/Pipfile b/python/Pipfile new file mode 100644 index 00000000000..9534830b5eb --- /dev/null +++ b/python/Pipfile @@ -0,0 +1,11 @@ +[[source]] +name =3D "pypi" +url =3D "https://pypi.org/simple" +verify_ssl =3D true + +[dev-packages] + +[packages] + +[requires] +python_version =3D "3.6" --=20 2.29.2 From nobody Sun Feb 8 11:40:42 2026 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 ARC-Seal: i=1; a=rsa-sha256; t=1613676979; cv=none; d=zohomail.com; s=zohoarc; b=SE3Ln4z2Eb0Low2/l3NIKma3JvhT0R20a5g1E8YiZALg+8vSs689qa32rw21lX9Ma92aA9kgoPkeyS1+BcRLQlMHRMA9JaOApHRmgq2Xx3r5t2rwfqHXCUMApAgiXg7m+qe5n3XlCUBc9mIEkUHpT7vCMBd23PkRXnhUvzlkKaU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613676979; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=gxKKfmz313lSQsjex46wuXkV3vUw3yxAmRwiuCI6xvE=; b=PqCbi46izinqKP8ivpwz31h5Uf/+lKfANd8WmSAZ4YpaJ78vu6xTwL5C4LDgiQuFnuQtA/N2l9wEamqDxlqj4if4kdK4cvI9NbF2jvmMR9sf99bsw9PAgPWs/0Ycn9NOEMLqdSu4yPKKSP9UY/jrx81+dIPqA3rK2QiwzlKz+lE= ARC-Authentication-Results: i=1; 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 header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1613676979459770.77060867303; Thu, 18 Feb 2021 11:36:19 -0800 (PST) Received: from localhost ([::1]:43260 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lCp62-00018X-Cs for importer@patchew.org; Thu, 18 Feb 2021 14:36:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35156) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lCoy9-0002oP-BQ for qemu-devel@nongnu.org; Thu, 18 Feb 2021 14:28:10 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:42248) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lCoy4-0003X9-FK for qemu-devel@nongnu.org; Thu, 18 Feb 2021 14:28:09 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-188-jcX_qZalNASZWnE8Hp4uhg-1; Thu, 18 Feb 2021 14:28:01 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0363180196C; Thu, 18 Feb 2021 19:28:00 +0000 (UTC) Received: from scv.redhat.com (ovpn-112-247.rdu2.redhat.com [10.10.112.247]) by smtp.corp.redhat.com (Postfix) with ESMTP id B431B60BE5; Thu, 18 Feb 2021 19:27:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613676483; 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=gxKKfmz313lSQsjex46wuXkV3vUw3yxAmRwiuCI6xvE=; b=WLQkAJommvkDVV4tEamzGpOnVW8oHdL4MKifMICPfwsTvqlEKgiCdTzlt6sbia83e4ijIB zmOK1u6AOmGzYf4WLobwVEim0Tw+1Q4rL3jbjnSeHvZbCBDpG4RvaLhvLKzwe8g2L9n58Y 9pVuPryCmjpVW7Eh5SlBHevciAKHK/Q= X-MC-Unique: jcX_qZalNASZWnE8Hp4uhg-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v5 09/25] python: add pylint import exceptions Date: Thu, 18 Feb 2021 14:27:17 -0500 Message-Id: <20210218192733.370968-10-jsnow@redhat.com> In-Reply-To: <20210218192733.370968-1-jsnow@redhat.com> References: <20210218192733.370968-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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=63.128.21.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H4=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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Kevin Wolf , Thomas Huth , Beraldo Leal , qemu-block@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Max Reitz , Willian Rampazzo , Cleber Rosa , John Snow , Eduardo Habkost Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Pylint 2.5.x and 2.6.x have regressions that make import checking inconsistent, see: https://github.com/PyCQA/pylint/issues/3609 https://github.com/PyCQA/pylint/issues/3624 https://github.com/PyCQA/pylint/issues/3651 Pinning to 2.4.4 is worse, because it mandates versions of shared dependencies that are too old for features we want in isort and mypy. Oh well. Signed-off-by: John Snow Reviewed-by: Cleber Rosa --- python/qemu/machine/__init__.py | 3 +++ python/qemu/machine/machine.py | 2 +- python/qemu/machine/qtest.py | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/python/qemu/machine/__init__.py b/python/qemu/machine/__init__= .py index 98302ea31e7..728f27adbed 100644 --- a/python/qemu/machine/__init__.py +++ b/python/qemu/machine/__init__.py @@ -22,6 +22,9 @@ # the COPYING file in the top-level directory. # =20 +# pylint: disable=3Dimport-error +# see: https://github.com/PyCQA/pylint/issues/3624 +# see: https://github.com/PyCQA/pylint/issues/3651 from .machine import QEMUMachine from .qtest import QEMUQtestMachine, QEMUQtestProtocol =20 diff --git a/python/qemu/machine/machine.py b/python/qemu/machine/machine.py index cc0d2bb23f9..498d49e7f04 100644 --- a/python/qemu/machine/machine.py +++ b/python/qemu/machine/machine.py @@ -38,7 +38,7 @@ Type, ) =20 -from qemu.qmp import ( +from qemu.qmp import ( # pylint: disable=3Dimport-error QEMUMonitorProtocol, QMPMessage, QMPReturnValue, diff --git a/python/qemu/machine/qtest.py b/python/qemu/machine/qtest.py index 53926e434a7..c3adf4e3012 100644 --- a/python/qemu/machine/qtest.py +++ b/python/qemu/machine/qtest.py @@ -26,7 +26,7 @@ TextIO, ) =20 -from qemu.qmp import SocketAddrT +from qemu.qmp import SocketAddrT # pylint: disable=3Dimport-error =20 from .machine import QEMUMachine =20 --=20 2.29.2 From nobody Sun Feb 8 11:40:42 2026 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 ARC-Seal: i=1; a=rsa-sha256; t=1613677431; cv=none; d=zohomail.com; s=zohoarc; b=G1AKw778YQrK6za56zTIj1fgHFNWbTovYwdIcIK8CaAenARtvTJATq379HgAAlqFOV917sdcy3HotiC8OKyloNIXCl20xPrRmysI2qPOwV+jaybrDCMbIbd461Fe1LSOPcCSqEH5pOsLA5WvZdk9tXULeWIacx7IFuFvjvL4CEo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613677431; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=nGpJKIil6qklX1QjgOEk8p+MTdlipOKu9XOZg4oMLR8=; b=Qwv7a6mbBbD+Zn4SfDQ+8xwb3ny8l8sdPm5Z2rsARS2EV94ZOTrOOjKKW+25pEBViZUW72RSrW+fUsUNHOFthMeC24+GkQZ6Tbpk4K9jsdS7nzAM2U5msnGQhEJ3nSdfttw7drLbLhQDh7BJ6ZFudf1Xbq1B/cL1P7cYXQBuANg= ARC-Authentication-Results: i=1; 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 header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1613677431283204.88434414088624; Thu, 18 Feb 2021 11:43:51 -0800 (PST) Received: from localhost ([::1]:59744 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lCpDK-0000Dj-1g for importer@patchew.org; Thu, 18 Feb 2021 14:43:50 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35126) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lCoy6-0002mW-VC for qemu-devel@nongnu.org; Thu, 18 Feb 2021 14:28:07 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:26727) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lCoy4-0003Xs-Rk for qemu-devel@nongnu.org; Thu, 18 Feb 2021 14:28:06 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-397-UKarktHiOri9cWtsH0GHSA-1; Thu, 18 Feb 2021 14:28:02 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6AB861020C21; Thu, 18 Feb 2021 19:28:01 +0000 (UTC) Received: from scv.redhat.com (ovpn-112-247.rdu2.redhat.com [10.10.112.247]) by smtp.corp.redhat.com (Postfix) with ESMTP id 26D1360BE5; Thu, 18 Feb 2021 19:28:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613676484; 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=nGpJKIil6qklX1QjgOEk8p+MTdlipOKu9XOZg4oMLR8=; b=Nkfn6tnrOzLE2h6/4EgxkwjqTTsF8R1mZD7cR6K6xQfZhHOxbHP6USuKBWC+pprLWvn/uS 0LIymPMYlQKZKJM75PwNm5tw9mhv9ZV9eqb8L/ZSOmu/nol1bdIBk7haPjFngXhT35lrLK EJQZWybRbbSgrQWuHKASNaCE73ed3xw= X-MC-Unique: UKarktHiOri9cWtsH0GHSA-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v5 10/25] python: move pylintrc into setup.cfg Date: Thu, 18 Feb 2021 14:27:18 -0500 Message-Id: <20210218192733.370968-11-jsnow@redhat.com> In-Reply-To: <20210218192733.370968-1-jsnow@redhat.com> References: <20210218192733.370968-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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=216.205.24.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Kevin Wolf , Thomas Huth , Beraldo Leal , qemu-block@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Max Reitz , Willian Rampazzo , Cleber Rosa , John Snow , Eduardo Habkost Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Delete the empty settings now that it's sharing a home with settings for other tools. pylint can now be run from this folder as "pylint qemu". Signed-off-by: John Snow Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa --- python/qemu/machine/pylintrc | 58 ------------------------------------ python/setup.cfg | 29 ++++++++++++++++++ 2 files changed, 29 insertions(+), 58 deletions(-) delete mode 100644 python/qemu/machine/pylintrc diff --git a/python/qemu/machine/pylintrc b/python/qemu/machine/pylintrc deleted file mode 100644 index 3f69205000d..00000000000 --- a/python/qemu/machine/pylintrc +++ /dev/null @@ -1,58 +0,0 @@ -[MASTER] - -[MESSAGES CONTROL] - -# Disable the message, report, category or checker with the given id(s). Y= ou -# can either give multiple identifiers separated by comma (,) or put this -# option multiple times (only on the command line, not in the configuration -# file where it should appear only once). You can also use "--disable=3Dal= l" to -# disable everything first and then reenable specific checks. For example,= if -# you want to run only the similarities checker, you can use "--disable=3D= all -# --enable=3Dsimilarities". If you want to run only the classes checker, b= ut have -# no Warning level messages displayed, use "--disable=3Dall --enable=3Dcla= sses -# --disable=3DW". -disable=3Dtoo-many-arguments, - too-many-instance-attributes, - too-many-public-methods, - -[REPORTS] - -[REFACTORING] - -[MISCELLANEOUS] - -[LOGGING] - -[BASIC] - -# Good variable names which should always be accepted, separated by a comm= a. -good-names=3Di, - j, - k, - ex, - Run, - _, - fd, - c, -[VARIABLES] - -[STRING] - -[SPELLING] - -[FORMAT] - -[SIMILARITIES] - -# Ignore imports when computing similarities. -ignore-imports=3Dyes - -[TYPECHECK] - -[CLASSES] - -[IMPORTS] - -[DESIGN] - -[EXCEPTIONS] diff --git a/python/setup.cfg b/python/setup.cfg index e7f8ab23815..20b24372a4a 100644 --- a/python/setup.cfg +++ b/python/setup.cfg @@ -18,3 +18,32 @@ classifiers =3D [options] python_requires =3D >=3D 3.6 packages =3D find_namespace: + +[pylint.messages control] +# Disable the message, report, category or checker with the given id(s). Y= ou +# can either give multiple identifiers separated by comma (,) or put this +# option multiple times (only on the command line, not in the configuration +# file where it should appear only once). You can also use "--disable=3Dal= l" to +# disable everything first and then reenable specific checks. For example,= if +# you want to run only the similarities checker, you can use "--disable=3D= all +# --enable=3Dsimilarities". If you want to run only the classes checker, b= ut have +# no Warning level messages displayed, use "--disable=3Dall --enable=3Dcla= sses +# --disable=3DW". +disable=3Dtoo-many-arguments, + too-many-instance-attributes, + too-many-public-methods, + +[pylint.basic] +# Good variable names which should always be accepted, separated by a comm= a. +good-names=3Di, + j, + k, + ex, + Run, + _, + fd, + c, + +[pylint.similarities] +# Ignore imports when computing similarities. +ignore-imports=3Dyes --=20 2.29.2 From nobody Sun Feb 8 11:40:42 2026 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 ARC-Seal: i=1; a=rsa-sha256; t=1613677686; cv=none; d=zohomail.com; s=zohoarc; b=RGS3rozrQcWPGxSXW7faPnohHJiIy68zzb+XBRIjlZWEnbUUUQmSkqpBwRWRfA6aN5wq56QCTSTNf3CVUg42ZdFQzAwfNELzTYwxZauGqtzc37wmITfYxBzkQ90hrv6+SJjKL1jcsNct0D+yzLGJo7nnpd3VhgrhG7Iw/fnvNSc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613677686; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=jnP52ZSevoLgCG1KBQMqHHxlqDWKAd2gdS+V7jXH60A=; b=VSBTq8ZXwX7Vq6i0lhaCht9lZlAHZHRe4hPJkVh2iQ6hEAQwF2Zcj2XNCHE6QheB/TtSDL73U1PT7sfpIjMK6PMxMW1ddn10lnpX4IyCP4pXqQlkrr/r9dettELsD+SdaUYi/+CQdVia7EQscF1lvI7WVbKYjhZgfqn5VMNmJbo= ARC-Authentication-Results: i=1; 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 header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 161367768563697.87622582062033; Thu, 18 Feb 2021 11:48:05 -0800 (PST) Received: from localhost ([::1]:38876 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lCpHQ-0003PZ-68 for importer@patchew.org; Thu, 18 Feb 2021 14:48:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35188) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lCoyB-0002sV-MS for qemu-devel@nongnu.org; Thu, 18 Feb 2021 14:28:12 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:43978) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lCoy9-0003ZY-Cz for qemu-devel@nongnu.org; Thu, 18 Feb 2021 14:28:11 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-449-frpb2WbKOMOmaOak3_tTxQ-1; Thu, 18 Feb 2021 14:28:06 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 51BBD107ACE4; Thu, 18 Feb 2021 19:28:05 +0000 (UTC) Received: from scv.redhat.com (ovpn-112-247.rdu2.redhat.com [10.10.112.247]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8DDD860BE5; Thu, 18 Feb 2021 19:28:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613676488; 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=jnP52ZSevoLgCG1KBQMqHHxlqDWKAd2gdS+V7jXH60A=; b=RQtD4BHueR3ERjxvuhsw6bcypOGz3ddvzfaUSerOhtzC/Eqg/l/DMNUeQSH9GxKyyOhqo6 EmWj/bMR8weJltCAPIt55pstMcy34EbuYlAuIr/1Dn+MsiQ666LZLbtkyqLCZiZnfxx8Op T5pyESl15kVsxk8DOSbuJXD75pwUU54= X-MC-Unique: frpb2WbKOMOmaOak3_tTxQ-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v5 11/25] python: add pylint to pipenv Date: Thu, 18 Feb 2021 14:27:19 -0500 Message-Id: <20210218192733.370968-12-jsnow@redhat.com> In-Reply-To: <20210218192733.370968-1-jsnow@redhat.com> References: <20210218192733.370968-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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=216.205.24.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Kevin Wolf , Thomas Huth , Beraldo Leal , qemu-block@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Max Reitz , Willian Rampazzo , Cleber Rosa , John Snow , Eduardo Habkost Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" We are specifying >=3D pylint 2.6.x for two reasons: 1. For setup.cfg support, added in pylint 2.5.x 2. To clarify that we are using a version that has incompatibly dropped bad-whitespace checks. Signed-off-by: John Snow Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa --- python/Pipfile | 1 + python/Pipfile.lock | 137 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 138 insertions(+) create mode 100644 python/Pipfile.lock diff --git a/python/Pipfile b/python/Pipfile index 9534830b5eb..1e58986c895 100644 --- a/python/Pipfile +++ b/python/Pipfile @@ -4,6 +4,7 @@ url =3D "https://pypi.org/simple" verify_ssl =3D true =20 [dev-packages] +pylint =3D ">=3D2.6.0" =20 [packages] =20 diff --git a/python/Pipfile.lock b/python/Pipfile.lock new file mode 100644 index 00000000000..4506335b7d9 --- /dev/null +++ b/python/Pipfile.lock @@ -0,0 +1,137 @@ +{ + "_meta": { + "hash": { + "sha256": "b7ac1f2ad73bc166244c0378298afba64951a16bb749b81a966= 8dc41f40f941c" + }, + "pipfile-spec": 6, + "requires": { + "python_version": "3.6" + }, + "sources": [ + { + "name": "pypi", + "url": "https://pypi.org/simple", + "verify_ssl": true + } + ] + }, + "default": {}, + "develop": { + "astroid": { + "hashes": [ + "sha256:2f4078c2a41bf377eea06d71c9d2ba4eb8f6b1af2135bec27b= bbb7d8f12bb703", + "sha256:bc58d83eb610252fd8de6363e39d4f1d0619c894b0ed24603b= 881c02e64c7386" + ], + "markers": "python_version >=3D '3.5'", + "version": "=3D=3D2.4.2" + }, + "isort": { + "hashes": [ + "sha256:c729845434366216d320e936b8ad6f9d681aab72dc7cbc2d51= bedc3582f3ad1e", + "sha256:fff4f0c04e1825522ce6949973e83110a6e907750cd92d128b= 0d14aaaadbffdc" + ], + "markers": "python_version >=3D '3.6' and python_version < '4.= 0'", + "version": "=3D=3D5.7.0" + }, + "lazy-object-proxy": { + "hashes": [ + "sha256:0c4b206227a8097f05c4dbdd323c50edf81f15db3b8dc064d0= 8c62d37e1a504d", + "sha256:194d092e6f246b906e8f70884e620e459fc54db3259e60cf69= a4d66c3fda3449", + "sha256:1be7e4c9f96948003609aa6c974ae59830a6baecc5376c25c9= 2d7d697e684c08", + "sha256:4677f594e474c91da97f489fea5b7daa17b5517190899cf213= 697e48d3902f5a", + "sha256:48dab84ebd4831077b150572aec802f303117c8cc5c871e182= 447281ebf3ac50", + "sha256:5541cada25cd173702dbd99f8e22434105456314462326f06d= ba3e180f203dfd", + "sha256:59f79fef100b09564bc2df42ea2d8d21a64fdcda64979c0fa3= db7bdaabaf6239", + "sha256:8d859b89baf8ef7f8bc6b00aa20316483d67f0b1cbf422f5b4= dc56701c8f2ffb", + "sha256:9254f4358b9b541e3441b007a0ea0764b9d056afdeafc1a556= 9eee1cc6c1b9ea", + "sha256:9651375199045a358eb6741df3e02a651e0330be090b3bc79f= 6d0de31a80ec3e", + "sha256:97bb5884f6f1cdce0099f86b907aa41c970c3c672ac8b9c835= 2789e103cf3156", + "sha256:9b15f3f4c0f35727d3a0fba4b770b3c4ebbb1fa907dbcc046a= 1d2799f3edd142", + "sha256:a2238e9d1bb71a56cd710611a1614d1194dc10a175c1e08d75= e1a7bcc250d442", + "sha256:a6ae12d08c0bf9909ce12385803a543bfe99b95fe01e752536= a60af2b7797c62", + "sha256:ca0a928a3ddbc5725be2dd1cf895ec0a254798915fb3a36af0= 964a0a4149e3db", + "sha256:cb2c7c57005a6804ab66f106ceb8482da55f5314b7fcb06551= db1edae4ad1531", + "sha256:d74bb8693bf9cf75ac3b47a54d716bbb1a92648d5f781fc799= 347cfc95952383", + "sha256:d945239a5639b3ff35b70a88c5f2f491913eb94871780ebfab= b2568bd58afc5a", + "sha256:eba7011090323c1dadf18b3b689845fd96a61ba0a1dfbd7f24= b921398affc357", + "sha256:efa1909120ce98bbb3777e8b6f92237f5d5c8ea6758efea36a= 473e1d38f7d3e4", + "sha256:f3900e8a5de27447acbf900b4750b0ddfd7ec1ea7fbaf11dfa= 911141bc522af0" + ], + "markers": "python_version >=3D '2.7' and python_version not i= n '3.0, 3.1, 3.2, 3.3'", + "version": "=3D=3D1.4.3" + }, + "mccabe": { + "hashes": [ + "sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d= 64e79735b80d42", + "sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb= 0f125271b8831f" + ], + "version": "=3D=3D0.6.1" + }, + "pylint": { + "hashes": [ + "sha256:bb4a908c9dadbc3aac18860550e870f58e1a02c9f2c204fdf5= 693d73be061210", + "sha256:bfe68f020f8a0fece830a22dd4d5dddb4ecc6137db04face4c= 3420a46a52239f" + ], + "index": "pypi", + "version": "=3D=3D2.6.0" + }, + "six": { + "hashes": [ + "sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8b= afd8ce11080259", + "sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426= e82dddb04a5ced" + ], + "markers": "python_version >=3D '2.7' and python_version not i= n '3.0, 3.1, 3.2'", + "version": "=3D=3D1.15.0" + }, + "toml": { + "hashes": [ + "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894= a5f779cabb4f9b", + "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bd= ed2f839ccbe68f" + ], + "markers": "python_version >=3D '2.6' and python_version not i= n '3.0, 3.1, 3.2'", + "version": "=3D=3D0.10.2" + }, + "typed-ast": { + "hashes": [ + "sha256:07d49388d5bf7e863f7fa2f124b1b1d89d8aa0e2f7812faff0= a5658c01c59aa1", + "sha256:14bf1522cdee369e8f5581238edac09150c765ec1cb3361585= 5889cf33dcb92d", + "sha256:240296b27397e4e37874abb1df2a608a92df85cf3e2a04d0d4= d61055c8305ba6", + "sha256:36d829b31ab67d6fcb30e185ec996e1f72b892255a745d3a82= 138c97d21ed1cd", + "sha256:37f48d46d733d57cc70fd5f30572d11ab8ed92da6e6b28e024= e4a3edfb456e37", + "sha256:4c790331247081ea7c632a76d5b2a265e6d325ecd3179d06e9= cf8d46d90dd151", + "sha256:5dcfc2e264bd8a1db8b11a892bd1647154ce03eeba94b461ef= fe68790d8b8e07", + "sha256:7147e2a76c75f0f64c4319886e7639e490fee87c9d25cb1d4f= aef1d8cf83a440", + "sha256:7703620125e4fb79b64aa52427ec192822e9f45d37d4b6625a= b37ef403e1df70", + "sha256:8368f83e93c7156ccd40e49a783a6a6850ca25b556c0fa0240= ed0f659d2fe496", + "sha256:84aa6223d71012c68d577c83f4e7db50d11d6b1399a9c77904= 6d75e24bed74ea", + "sha256:85f95aa97a35bdb2f2f7d10ec5bbdac0aeb9dafdaf88e17492= da0504de2e6400", + "sha256:8db0e856712f79c45956da0c9a40ca4246abc3485ae0d7ecc8= 6a20f5e4c09abc", + "sha256:9044ef2df88d7f33692ae3f18d3be63dec69c4fb1b5a4a9ac9= 50f9b4ba571606", + "sha256:963c80b583b0661918718b095e02303d8078950b26cc00b5e5= ea9ababe0de1fc", + "sha256:987f15737aba2ab5f3928c617ccf1ce412e2e321c77ab16ca5= a293e7bbffd581", + "sha256:9ec45db0c766f196ae629e509f059ff05fc3148f9ffd28f3cf= e75d4afb485412", + "sha256:9fc0b3cb5d1720e7141d103cf4819aea239f7d136acf9ee4a6= 9b047b7986175a", + "sha256:a2c927c49f2029291fbabd673d51a2180038f8cd5a5b2f290f= 78c4516be48be2", + "sha256:a38878a223bdd37c9709d07cd357bb79f4c760b29210e14ad0= fb395294583787", + "sha256:b4fcdcfa302538f70929eb7b392f536a237cbe2ed9cba88e3b= f5027b39f5f77f", + "sha256:c0c74e5579af4b977c8b932f40a5464764b2f86681327410aa= 028a22d2f54937", + "sha256:c1c876fd795b36126f773db9cbb393f19808edd2637e00fd6c= aba0e25f2c7b64", + "sha256:c9aadc4924d4b5799112837b226160428524a9a45f830e0d0f= 184b19e4090487", + "sha256:cc7b98bf58167b7f2db91a4327da24fb93368838eb84a44c47= 2283778fc2446b", + "sha256:cf54cfa843f297991b7388c281cb3855d911137223c6b6d2dd= 82a47ae5125a41", + "sha256:d003156bb6a59cda9050e983441b7fa2487f7800d76bdc0655= 66b7d728b4581a", + "sha256:d175297e9533d8d37437abc14e8a83cbc68af93cc9c1c59c2c= 292ec59a0697a3", + "sha256:d746a437cdbca200622385305aedd9aef68e8a645e385cc483= bdc5e488f07166", + "sha256:e683e409e5c45d5c9082dc1daf13f6374300806240719f95dc= 783d1fc942af10" + ], + "markers": "implementation_name =3D=3D 'cpython' and python_ve= rsion < '3.8'", + "version": "=3D=3D1.4.2" + }, + "wrapt": { + "hashes": [ + "sha256:b62ffa81fb85f4332a4f609cab4ac40709470da05643a082ec= 1eb88e6d9b97d7" + ], + "version": "=3D=3D1.12.1" + } + } +} --=20 2.29.2 From nobody Sun Feb 8 11:40:42 2026 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 1613677415817759.0275970338658; Thu, 18 Feb 2021 11:43:35 -0800 (PST) Received: from localhost ([::1]:59330 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lCpD4-0008TG-HK for importer@patchew.org; Thu, 18 Feb 2021 14:43:34 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35228) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lCoyD-0002sn-9n for qemu-devel@nongnu.org; Thu, 18 Feb 2021 14:28:13 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:21456) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lCoyB-0003b4-B8 for qemu-devel@nongnu.org; Thu, 18 Feb 2021 14:28:13 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-325-25UHD33yMpWsf_mdrSiajA-1; Thu, 18 Feb 2021 14:28:08 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C2BA780196E; Thu, 18 Feb 2021 19:28:06 +0000 (UTC) Received: from scv.redhat.com (ovpn-112-247.rdu2.redhat.com [10.10.112.247]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7559960BE5; Thu, 18 Feb 2021 19:28:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613676490; 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=9p6pTFtVJM9AG/0iTZHS5itaFgr66sjlfob7agnyIc8=; b=PyCCTB1rEt3q3nDpFpHQSmV5OJeoUEWnNm5dEce4IUB9iiEYw1EaIQKtE5mxE9JWpiV0WR aB6S8cGIkH5iE6H49qYptru8iAvCGmAKFA9cUYF9hTsupbb6u96+tEZ4ka0rhIxL3j1pg4 grAwkzR9KZrANzwOBX5B04yh9X7IJxg= X-MC-Unique: 25UHD33yMpWsf_mdrSiajA-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v5 12/25] python: move flake8 config to setup.cfg Date: Thu, 18 Feb 2021 14:27:20 -0500 Message-Id: <20210218192733.370968-13-jsnow@redhat.com> In-Reply-To: <20210218192733.370968-1-jsnow@redhat.com> References: <20210218192733.370968-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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=216.205.24.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Kevin Wolf , Thomas Huth , Beraldo Leal , qemu-block@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Max Reitz , Willian Rampazzo , Cleber Rosa , John Snow , Eduardo Habkost Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Update the comment concerning the flake8 exception to match commit 42c0dd12, whose commit message stated: A note on the flake8 exception: flake8 will warn on *any* bare except, but pylint's is context-aware and will suppress the warning if you re-raise the exception. Signed-off-by: John Snow Reviewed-by: Cleber Rosa --- python/qemu/machine/.flake8 | 2 -- python/setup.cfg | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) delete mode 100644 python/qemu/machine/.flake8 diff --git a/python/qemu/machine/.flake8 b/python/qemu/machine/.flake8 deleted file mode 100644 index 45d8146f3f5..00000000000 --- a/python/qemu/machine/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -extend-ignore =3D E722 # Pylint handles this, but smarter. \ No newline at end of file diff --git a/python/setup.cfg b/python/setup.cfg index 20b24372a4a..9ecb2902006 100644 --- a/python/setup.cfg +++ b/python/setup.cfg @@ -19,6 +19,9 @@ classifiers =3D python_requires =3D >=3D 3.6 packages =3D find_namespace: =20 +[flake8] +extend-ignore =3D E722 # Prefer pylint's bare-except checks to flake8's + [pylint.messages control] # Disable the message, report, category or checker with the given id(s). Y= ou # can either give multiple identifiers separated by comma (,) or put this --=20 2.29.2 From nobody Sun Feb 8 11:40:42 2026 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 1613677874839189.53130546146178; Thu, 18 Feb 2021 11:51:14 -0800 (PST) Received: from localhost ([::1]:45702 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lCpKT-0006EG-I0 for importer@patchew.org; Thu, 18 Feb 2021 14:51:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35280) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lCoyG-0002zE-Eg for qemu-devel@nongnu.org; Thu, 18 Feb 2021 14:28:16 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:38040) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lCoyD-0003c8-Tw for qemu-devel@nongnu.org; Thu, 18 Feb 2021 14:28:16 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-43-ssBECl0mOlejJHumprmWVA-1; Thu, 18 Feb 2021 14:28:09 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 311EE801965; Thu, 18 Feb 2021 19:28:08 +0000 (UTC) Received: from scv.redhat.com (ovpn-112-247.rdu2.redhat.com [10.10.112.247]) by smtp.corp.redhat.com (Postfix) with ESMTP id E23FA60BE5; Thu, 18 Feb 2021 19:28:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613676493; 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=D7BiXHLkxadzDPwCgV1hzUxbrB99XWjmyQpbFSDezk4=; b=cv7LGVBD9+H/Aqw2jgCSNO+Q9EMrwy/IMQhr1q6LvR46We+XsZpuKblayYWxPzNyUK9/Cl CfbHV3Hd2BoAPWbuQdCxE5L0aWVWZnsoLApEk+e0qIMVnQDjC3tQ5CI9hHQqXZFM4UyykF lJ5NBAAkJa9WAFD/tox6ygsKSpg9GK8= X-MC-Unique: ssBECl0mOlejJHumprmWVA-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v5 13/25] python: add excluded dirs to flake8 config Date: Thu, 18 Feb 2021 14:27:21 -0500 Message-Id: <20210218192733.370968-14-jsnow@redhat.com> In-Reply-To: <20210218192733.370968-1-jsnow@redhat.com> References: <20210218192733.370968-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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=216.205.24.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Kevin Wolf , Thomas Huth , Beraldo Leal , qemu-block@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Max Reitz , Willian Rampazzo , Cleber Rosa , John Snow , Eduardo Habkost Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Instruct flake8 to avoid certain well-known directories created by python tooling that it ought not check. Note that at-present, nothing actually creates a ".venv" directory; but it is in such widespread usage as a de-facto location for a developer's virtual environment that it should be excluded anyway. A forthcoming commit canonizes this with a "make venv" command. Signed-off-by: John Snow --- python/setup.cfg | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/setup.cfg b/python/setup.cfg index 9ecb2902006..f21a1c42fc0 100644 --- a/python/setup.cfg +++ b/python/setup.cfg @@ -21,6 +21,8 @@ packages =3D find_namespace: =20 [flake8] extend-ignore =3D E722 # Prefer pylint's bare-except checks to flake8's +exclude =3D __pycache__, + .venv, =20 [pylint.messages control] # Disable the message, report, category or checker with the given id(s). Y= ou --=20 2.29.2 From nobody Sun Feb 8 11:40:42 2026 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 1613676741897560.1454402544955; Thu, 18 Feb 2021 11:32:21 -0800 (PST) Received: from localhost ([::1]:34040 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lCp2C-0005SQ-Kb for importer@patchew.org; Thu, 18 Feb 2021 14:32:20 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35268) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lCoyF-0002xW-Ii for qemu-devel@nongnu.org; Thu, 18 Feb 2021 14:28:15 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:24861) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lCoyD-0003bq-D9 for qemu-devel@nongnu.org; Thu, 18 Feb 2021 14:28:15 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-402-JJO4SvxMMa67iLjwHZQBoA-1; Thu, 18 Feb 2021 14:28:10 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8F4371005501; Thu, 18 Feb 2021 19:28:09 +0000 (UTC) Received: from scv.redhat.com (ovpn-112-247.rdu2.redhat.com [10.10.112.247]) by smtp.corp.redhat.com (Postfix) with ESMTP id 525D160BE5; Thu, 18 Feb 2021 19:28:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613676492; 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=u78hVotkjG5VOuLO6zQ5VzsMpxYa3Y39PlJgjHPdLvk=; b=WpuZTQig+Meh5QgFsf4TtbCRd3jWueU4hGO5zz47QNEQcwDz/01b3WSSeoq2To9YeLWyO+ XblQJDlQw8DW/5g39h0rJe70q8SD7A8yUCwqxMok5uAtegyyjHgz7rVQFfGTBCbXvzXNw/ v3wAn2TJ10Y38rCDQ5VpSUUm1bRNq1c= X-MC-Unique: JJO4SvxMMa67iLjwHZQBoA-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v5 14/25] python: Add flake8 to pipenv Date: Thu, 18 Feb 2021 14:27:22 -0500 Message-Id: <20210218192733.370968-15-jsnow@redhat.com> In-Reply-To: <20210218192733.370968-1-jsnow@redhat.com> References: <20210218192733.370968-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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=63.128.21.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H4=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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Kevin Wolf , Thomas Huth , Beraldo Leal , qemu-block@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Max Reitz , Willian Rampazzo , Cleber Rosa , John Snow , Eduardo Habkost Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" flake8 3.5.x does not support the --extend-ignore syntax used in the .flake8 file to gracefully extend default ignores, so 3.6.x is our minimum requirement. There is no known upper bound. flake8 can be run from the python/ directory with no arguments. Signed-off-by: John Snow Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa --- python/Pipfile | 1 + python/Pipfile.lock | 51 ++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 51 insertions(+), 1 deletion(-) diff --git a/python/Pipfile b/python/Pipfile index 1e58986c895..d1f7045f680 100644 --- a/python/Pipfile +++ b/python/Pipfile @@ -4,6 +4,7 @@ url =3D "https://pypi.org/simple" verify_ssl =3D true =20 [dev-packages] +flake8 =3D ">=3D3.6.0" pylint =3D ">=3D2.6.0" =20 [packages] diff --git a/python/Pipfile.lock b/python/Pipfile.lock index 4506335b7d9..869b0bdf67f 100644 --- a/python/Pipfile.lock +++ b/python/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "b7ac1f2ad73bc166244c0378298afba64951a16bb749b81a966= 8dc41f40f941c" + "sha256": "9f6d4857a6c72ad40fc1ec1e58cdb76f187a2986ac4156f0027= e5eb798ec69a9" }, "pipfile-spec": 6, "requires": { @@ -25,6 +25,22 @@ "markers": "python_version >=3D '3.5'", "version": "=3D=3D2.4.2" }, + "flake8": { + "hashes": [ + "sha256:749dbbd6bfd0cf1318af27bf97a14e28e5ff548ef8e5b1566c= cfb25a11e7c839", + "sha256:aadae8761ec651813c24be05c6f7b4680857ef6afaae4651a4= eccaef97ce6c3b" + ], + "index": "pypi", + "version": "=3D=3D3.8.4" + }, + "importlib-metadata": { + "hashes": [ + "sha256:ace61d5fc652dc280e7b6b4ff732a9c2d40db2c0f92bc6cb74= e07b73d53a1771", + "sha256:fa5daa4477a7414ae34e95942e4dd07f62adf589143c875c13= 3c1e53c4eff38d" + ], + "markers": "python_version < '3.8'", + "version": "=3D=3D3.4.0" + }, "isort": { "hashes": [ "sha256:c729845434366216d320e936b8ad6f9d681aab72dc7cbc2d51= bedc3582f3ad1e", @@ -67,6 +83,22 @@ ], "version": "=3D=3D0.6.1" }, + "pycodestyle": { + "hashes": [ + "sha256:2295e7b2f6b5bd100585ebcb1f616591b652db8a741695b3d8= f5d28bdc934367", + "sha256:c58a7d2815e0e8d7972bf1803331fb0152f867bd89adf8a01d= fd55085434192e" + ], + "markers": "python_version >=3D '2.7' and python_version not i= n '3.0, 3.1, 3.2, 3.3'", + "version": "=3D=3D2.6.0" + }, + "pyflakes": { + "hashes": [ + "sha256:0d94e0e05a19e57a99444b6ddcf9a6eb2e5c68d3ca1e98e907= 07af8152c90a92", + "sha256:35b2d75ee967ea93b55750aa9edbbf72813e06a66ba54438df= 2cfac9e3c27fc8" + ], + "markers": "python_version >=3D '2.7' and python_version not i= n '3.0, 3.1, 3.2, 3.3'", + "version": "=3D=3D2.2.0" + }, "pylint": { "hashes": [ "sha256:bb4a908c9dadbc3aac18860550e870f58e1a02c9f2c204fdf5= 693d73be061210", @@ -127,11 +159,28 @@ "markers": "implementation_name =3D=3D 'cpython' and python_ve= rsion < '3.8'", "version": "=3D=3D1.4.2" }, + "typing-extensions": { + "hashes": [ + "sha256:7cb407020f00f7bfc3cb3e7881628838e69d8f3fcab2f64742= a5e76b2f841918", + "sha256:99d4073b617d30288f569d3f13d2bd7548c3a7e4c8de87db09= a9d29bb3a4a60c", + "sha256:dafc7639cde7f1b6e1acc0f457842a83e722ccca8eef5270af= 2d74792619a89f" + ], + "markers": "python_version < '3.8'", + "version": "=3D=3D3.7.4.3" + }, "wrapt": { "hashes": [ "sha256:b62ffa81fb85f4332a4f609cab4ac40709470da05643a082ec= 1eb88e6d9b97d7" ], "version": "=3D=3D1.12.1" + }, + "zipp": { + "hashes": [ + "sha256:102c24ef8f171fd729d46599845e95c7ab894a4cf45f5de11a= 44cc7444fb1108", + "sha256:ed5eee1974372595f9e416cc7bbeeb12335201d8081ca8a074= 3c954d4446e5cb" + ], + "markers": "python_version >=3D '3.6'", + "version": "=3D=3D3.4.0" } } } --=20 2.29.2 From nobody Sun Feb 8 11:40:42 2026 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 1613677761148533.8181606939507; Thu, 18 Feb 2021 11:49:21 -0800 (PST) Received: from localhost ([::1]:41196 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lCpIe-0004NW-2Z for importer@patchew.org; Thu, 18 Feb 2021 14:49:20 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35302) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lCoyI-00033y-Dz for qemu-devel@nongnu.org; Thu, 18 Feb 2021 14:28:18 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:48723) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lCoyG-0003dv-Qx for qemu-devel@nongnu.org; Thu, 18 Feb 2021 14:28:18 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-464-A7vswoc7Mdu8HiMH6JE14w-1; Thu, 18 Feb 2021 14:28:12 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0CDEA84E241; Thu, 18 Feb 2021 19:28:11 +0000 (UTC) Received: from scv.redhat.com (ovpn-112-247.rdu2.redhat.com [10.10.112.247]) by smtp.corp.redhat.com (Postfix) with ESMTP id B04A160BE5; Thu, 18 Feb 2021 19:28:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613676496; 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=ucJFioVVJLRQ67MWACmrGucUTZcqWDXTmAtDVYcPu2U=; b=NBb4rSYxTFLXscWTI3Uk8TuzZfpRkJUVVoUh9nzSewboJwudCoCYNR2Ej/Vfusa52bUFq9 kmnTvQsHOJiCRtji+Kkb5JQtpyIFCvt5+tSP4ONnkPzPVgxxpb0G5JzGzS+e2wCoE9/vRX +lZJhbe+/Dk+9mc9rnCxwUnnriRJHos= X-MC-Unique: A7vswoc7Mdu8HiMH6JE14w-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v5 15/25] python: move mypy.ini into setup.cfg Date: Thu, 18 Feb 2021 14:27:23 -0500 Message-Id: <20210218192733.370968-16-jsnow@redhat.com> In-Reply-To: <20210218192733.370968-1-jsnow@redhat.com> References: <20210218192733.370968-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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=63.128.21.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Kevin Wolf , Thomas Huth , Beraldo Leal , qemu-block@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Max Reitz , Willian Rampazzo , Cleber Rosa , John Snow , Eduardo Habkost Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" mypy supports reading its configuration values from a central project configuration file; do so. Signed-off-by: John Snow --- python/mypy.ini | 4 ---- python/setup.cfg | 5 +++++ 2 files changed, 5 insertions(+), 4 deletions(-) delete mode 100644 python/mypy.ini diff --git a/python/mypy.ini b/python/mypy.ini deleted file mode 100644 index 1a581c5f1ea..00000000000 --- a/python/mypy.ini +++ /dev/null @@ -1,4 +0,0 @@ -[mypy] -strict =3D True -python_version =3D 3.6 -warn_unused_configs =3D True diff --git a/python/setup.cfg b/python/setup.cfg index f21a1c42fc0..a3fcf67f8d2 100644 --- a/python/setup.cfg +++ b/python/setup.cfg @@ -24,6 +24,11 @@ extend-ignore =3D E722 # Prefer pylint's bare-except ch= ecks to flake8's exclude =3D __pycache__, .venv, =20 +[mypy] +strict =3D True +python_version =3D 3.6 +warn_unused_configs =3D True + [pylint.messages control] # Disable the message, report, category or checker with the given id(s). Y= ou # can either give multiple identifiers separated by comma (,) or put this --=20 2.29.2 From nobody Sun Feb 8 11:40:42 2026 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 1613677964926800.7648905438042; Thu, 18 Feb 2021 11:52:44 -0800 (PST) Received: from localhost ([::1]:49694 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lCpLv-0007yO-To for importer@patchew.org; Thu, 18 Feb 2021 14:52:43 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35318) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lCoyK-00037l-8P for qemu-devel@nongnu.org; Thu, 18 Feb 2021 14:28:20 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:36441) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lCoyH-0003eD-WB for qemu-devel@nongnu.org; Thu, 18 Feb 2021 14:28:19 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-332-gUWJjIQVO-ubrTe8s3RqJg-1; Thu, 18 Feb 2021 14:28:13 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 72ADB427C5; Thu, 18 Feb 2021 19:28:12 +0000 (UTC) Received: from scv.redhat.com (ovpn-112-247.rdu2.redhat.com [10.10.112.247]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2CE6E60BE5; Thu, 18 Feb 2021 19:28:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613676497; 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=MAmK655zNgk2J5QJKfZw6Xsu0ak6H0JldAXshWYoHdY=; b=CwgCF8RFFvJI4ID4oTdNz05Qk+MOwvAzl4lBlaiJ7GtjTdRJ2HLWj0f7TO615xXTlIEnH5 h86GVG1hHwLZKt2IIQkfXt6r3V7f5l9W7dFOkV6LZ4XX27VCOarm3iCZBKe+SzoMyfs9WQ 8C5/82q8emdcGp5amqHQCgAnJ+pmmTk= X-MC-Unique: gUWJjIQVO-ubrTe8s3RqJg-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v5 16/25] python: add mypy to pipenv Date: Thu, 18 Feb 2021 14:27:24 -0500 Message-Id: <20210218192733.370968-17-jsnow@redhat.com> In-Reply-To: <20210218192733.370968-1-jsnow@redhat.com> References: <20210218192733.370968-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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=63.128.21.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H4=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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Kevin Wolf , Thomas Huth , Beraldo Leal , qemu-block@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Max Reitz , Willian Rampazzo , Cleber Rosa , John Snow , Eduardo Habkost Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" 0.730 appears to be about the oldest version that works with the features we want, including nice human readable output (to make sure iotest 297 passes), and type-parameterized Popen generics. 0.770, however, supports adding 'strict' to the config file, so require at least 0.770. Now that we are checking a namespace package, we need to tell mypy to allow PEP420 namespaces, so modify the mypy config as part of the move. mypy can now be run from the python root by typing 'mypy -p qemu'. A note on mypy invocation: Running it as "mypy qemu/" changes the import path detection mechanisms in mypy slightly, and it will fail. See https://github.com/python/mypy/issues/8584 for a decent entry point with more breadcrumbs on the various behaviors that contribute to this subtle difference. Signed-off-by: John Snow Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa --- python/Pipfile | 1 + python/Pipfile.lock | 37 ++++++++++++++++++++++++++++++++++++- python/setup.cfg | 1 + 3 files changed, 38 insertions(+), 1 deletion(-) diff --git a/python/Pipfile b/python/Pipfile index d1f7045f680..51c537b0d10 100644 --- a/python/Pipfile +++ b/python/Pipfile @@ -5,6 +5,7 @@ verify_ssl =3D true =20 [dev-packages] flake8 =3D ">=3D3.6.0" +mypy =3D ">=3D0.770" pylint =3D ">=3D2.6.0" =20 [packages] diff --git a/python/Pipfile.lock b/python/Pipfile.lock index 869b0bdf67f..5f8aab117c3 100644 --- a/python/Pipfile.lock +++ b/python/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "9f6d4857a6c72ad40fc1ec1e58cdb76f187a2986ac4156f0027= e5eb798ec69a9" + "sha256": "65f010a8f2e55e9870d2b7e0d8af129516097d23abf2504f396= 552748b067ade" }, "pipfile-spec": 6, "requires": { @@ -83,6 +83,41 @@ ], "version": "=3D=3D0.6.1" }, + "mypy": { + "hashes": [ + "sha256:0d2fc8beb99cd88f2d7e20d69131353053fbecea17904ee6f0= 348759302c52fa", + "sha256:2b216eacca0ec0ee124af9429bfd858d5619a0725ee5f88057= e6e076f9eb1a7b", + "sha256:319ee5c248a7c3f94477f92a729b7ab06bf8a6d04447ef3aa8= c9ba2aa47c6dcf", + "sha256:3e0c159a7853e3521e3f582adb1f3eac66d0b0639d434278e2= 867af3a8c62653", + "sha256:5615785d3e2f4f03ab7697983d82c4b98af5c321614f51b8f1= 034eb9ebe48363", + "sha256:5ff616787122774f510caeb7b980542a7cc2222be3f00837a3= 04ea85cd56e488", + "sha256:6f8425fecd2ba6007e526209bb985ce7f49ed0d2ac1cc1a44f= 243380a06a84fb", + "sha256:74f5aa50d0866bc6fb8e213441c41e466c86678c800700b87b= 012ed11c0a13e0", + "sha256:90b6f46dc2181d74f80617deca611925d7e63007cf41639735= 8aa42efb593e07", + "sha256:947126195bfe4709c360e89b40114c6746ae248f04d379dca6= f6ab677aa07641", + "sha256:a301da58d566aca05f8f449403c710c50a9860782148332322= decf73a603280b", + "sha256:aa9d4901f3ee1a986a3a79fe079ffbf7f999478c281376f48f= aa31daaa814e86", + "sha256:b9150db14a48a8fa114189bfe49baccdff89da8c6639c27177= 50c7ae62316738", + "sha256:b95068a3ce3b50332c40e31a955653be245666a4bc7819d3c8= 898aa9fb9ea496", + "sha256:ca7ad5aed210841f1e77f5f2f7d725b62c78fa77519312042c= 719ed2ab937876", + "sha256:d16c54b0dffb861dc6318a8730952265876d90c5101085a4bc= 56913e8521ba19", + "sha256:e0202e37756ed09daf4b0ba64ad2c245d357659e014c3f51d8= cd0681ba66940a", + "sha256:e1c84c65ff6d69fb42958ece5b1255394714e0aac4df5ffe15= 1bc4fe19c7600a", + "sha256:e32b7b282c4ed4e378bba8b8dfa08e1cfa6f6574067ef22f86= bee5b1039de0c9", + "sha256:e3b8432f8df19e3c11235c4563a7250666dc9aa7cdda58d21b= 4177b20256ca9f", + "sha256:e497a544391f733eca922fdcb326d19e894789cd4ff61d48b4= b195776476c5cf", + "sha256:f5fdf935a46aa20aa937f2478480ebf4be9186e98e49cc3843= af9a5795a49a25" + ], + "index": "pypi", + "version": "=3D=3D0.800" + }, + "mypy-extensions": { + "hashes": [ + "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a= 299250a846f15d", + "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5= 343488a6c604a8" + ], + "version": "=3D=3D0.4.3" + }, "pycodestyle": { "hashes": [ "sha256:2295e7b2f6b5bd100585ebcb1f616591b652db8a741695b3d8= f5d28bdc934367", diff --git a/python/setup.cfg b/python/setup.cfg index a3fcf67f8d2..cdd8477292b 100644 --- a/python/setup.cfg +++ b/python/setup.cfg @@ -28,6 +28,7 @@ exclude =3D __pycache__, strict =3D True python_version =3D 3.6 warn_unused_configs =3D True +namespace_packages =3D True =20 [pylint.messages control] # Disable the message, report, category or checker with the given id(s). Y= ou --=20 2.29.2 From nobody Sun Feb 8 11:40:42 2026 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 ARC-Seal: i=1; a=rsa-sha256; t=1613677721; cv=none; d=zohomail.com; s=zohoarc; b=Rjw09XAErNPPYuCylcrsVwWfBJFgPvWegWukUm8spAv8MizdeOLwhmfFfwX47Ve0NKICE6J39IMYkabPDQWvNSNb8lauNSRahfb8HZogMbXQscsbB43MU4tEflxWNFgI4KPDophDkEHyipLjsTTlbsmr0knf69dqQFPDdi2u9Pc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613677721; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=O8rENN9+OCpxWgBg+fcckbhbR0bxxQup6n58tkpPXvc=; b=l+H0Sc7xB1k4OPAgSRtv7fZG7dFkm6mSce/RK/0+4nqoujwKcACczEd9k21QM6GpK6elKF1aF52LQMIEP6f65KyIva3X9z8yjCHnGe/vCjnOQHrJ2up1ZPsV7K+d21puSneDKOagF6h7kSMFa5i9FaZ9RC8id8TUf4foUFS35PQ= ARC-Authentication-Results: i=1; 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 header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1613677720792516.0312313758902; Thu, 18 Feb 2021 11:48:40 -0800 (PST) Received: from localhost ([::1]:39872 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lCpHz-0003ow-FX for importer@patchew.org; Thu, 18 Feb 2021 14:48:39 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35382) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lCoyQ-0003F1-MD for qemu-devel@nongnu.org; Thu, 18 Feb 2021 14:28:28 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:32903) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lCoyK-0003fp-Fj for qemu-devel@nongnu.org; Thu, 18 Feb 2021 14:28:24 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-146-ynPxICLjP3CTvIgEutpvag-1; Thu, 18 Feb 2021 14:28:17 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CE38684E243; Thu, 18 Feb 2021 19:28:16 +0000 (UTC) Received: from scv.redhat.com (ovpn-112-247.rdu2.redhat.com [10.10.112.247]) by smtp.corp.redhat.com (Postfix) with ESMTP id 937E260BE5; Thu, 18 Feb 2021 19:28:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613676499; 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=O8rENN9+OCpxWgBg+fcckbhbR0bxxQup6n58tkpPXvc=; b=KWtnY3iUi68spd24vV4wl3/2HvNpJBey+ieUMqqjWd7FeTmaUMTik+OneFQqiNggcDBZt3 KHst3Ekp734gJxfHrSR3CpC0uJVGbDA1Z9cTroJOV8Cs8SMPcubiF2O2ln/sw13XbjZynm Wy9G3ZI8CN623HOSMh/rFMLBe/cQd+E= X-MC-Unique: ynPxICLjP3CTvIgEutpvag-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v5 17/25] python: move .isort.cfg into setup.cfg Date: Thu, 18 Feb 2021 14:27:25 -0500 Message-Id: <20210218192733.370968-18-jsnow@redhat.com> In-Reply-To: <20210218192733.370968-1-jsnow@redhat.com> References: <20210218192733.370968-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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=63.128.21.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Kevin Wolf , Thomas Huth , Beraldo Leal , qemu-block@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Max Reitz , Willian Rampazzo , Cleber Rosa , John Snow , Eduardo Habkost Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Signed-off-by: John Snow Reviewed-by: Cleber Rosa --- python/.isort.cfg | 7 ------- python/setup.cfg | 8 ++++++++ 2 files changed, 8 insertions(+), 7 deletions(-) delete mode 100644 python/.isort.cfg diff --git a/python/.isort.cfg b/python/.isort.cfg deleted file mode 100644 index 6d0fd6cc0d3..00000000000 --- a/python/.isort.cfg +++ /dev/null @@ -1,7 +0,0 @@ -[settings] -force_grid_wrap=3D4 -force_sort_within_sections=3DTrue -include_trailing_comma=3DTrue -line_length=3D72 -lines_after_imports=3D2 -multi_line_output=3D3 \ No newline at end of file diff --git a/python/setup.cfg b/python/setup.cfg index cdd8477292b..8a2c200a581 100644 --- a/python/setup.cfg +++ b/python/setup.cfg @@ -58,3 +58,11 @@ good-names=3Di, [pylint.similarities] # Ignore imports when computing similarities. ignore-imports=3Dyes + +[isort] +force_grid_wrap=3D4 +force_sort_within_sections=3DTrue +include_trailing_comma=3DTrue +line_length=3D72 +lines_after_imports=3D2 +multi_line_output=3D3 --=20 2.29.2 From nobody Sun Feb 8 11:40:42 2026 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 ARC-Seal: i=1; a=rsa-sha256; t=1613676969; cv=none; d=zohomail.com; s=zohoarc; b=Esa851U8h7H7ik3nuDv6pJMVYODJs9C+YhZH9XPZhWEyD4dfcC1iKfuUxyfjOMXthodGdK/dJasXmTv1szHvb8duutfjzmXgilUEB0yqarz9rpVWyG/mDT5v2mFYmSAd66xQfsfK8oXV/SiXvzNscwj/TZY5o5CZigWzqDpOJrE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613676969; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=h/ML0fJdJfcOL0Fn4Oted3eqXVtL4RT3UFwN2ABrdnQ=; b=BjrQs+JhuL3QV6ou9plc2ng9RnxB+AK0NNslWNmPI/dizwOigxncTfXdlYS/RDPlFuiWFgvxeoGx4GiSi6YRhY9zePNMiTqFLgRiPakcWK/h7ScqA0Y5lNrN1uR7USi7ZWTbApCkiiK31FpXLtvgUUQuBcM0BHXGLhKnNaxut18= ARC-Authentication-Results: i=1; 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 header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1613676968600746.8309656046652; Thu, 18 Feb 2021 11:36:08 -0800 (PST) Received: from localhost ([::1]:42644 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lCp5r-0000pJ-Bx for importer@patchew.org; Thu, 18 Feb 2021 14:36:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35384) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lCoyQ-0003F4-Ox for qemu-devel@nongnu.org; Thu, 18 Feb 2021 14:28:28 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:26238) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lCoyL-0003gB-To for qemu-devel@nongnu.org; Thu, 18 Feb 2021 14:28:26 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-574-7qjzbmhTMkeLDj8Nr9aJ4A-1; Thu, 18 Feb 2021 14:28:19 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3D0EC18A2ACD; Thu, 18 Feb 2021 19:28:18 +0000 (UTC) Received: from scv.redhat.com (ovpn-112-247.rdu2.redhat.com [10.10.112.247]) by smtp.corp.redhat.com (Postfix) with ESMTP id F01F960BE5; Thu, 18 Feb 2021 19:28:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613676501; 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=h/ML0fJdJfcOL0Fn4Oted3eqXVtL4RT3UFwN2ABrdnQ=; b=bX+AV48bfHmRXlGMZtUhTBjek5RLL4YibkiGf4/T+XiwrS82CCb30WnvKsSc41YDaq8MTV PR83j9HOKduqFSf/Hr2GdBUkUcA2pfk3X0c1ZlhhowhWzA6FBHQHKDyioe10ARCntK00cx 4x4cUz12LKeiuHqUFCCidcgHzubVx+I= X-MC-Unique: 7qjzbmhTMkeLDj8Nr9aJ4A-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v5 18/25] python/qemu: add isort to pipenv Date: Thu, 18 Feb 2021 14:27:26 -0500 Message-Id: <20210218192733.370968-19-jsnow@redhat.com> In-Reply-To: <20210218192733.370968-1-jsnow@redhat.com> References: <20210218192733.370968-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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=63.128.21.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H4=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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Kevin Wolf , Thomas Huth , Beraldo Leal , qemu-block@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Max Reitz , Willian Rampazzo , Cleber Rosa , John Snow , Eduardo Habkost Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) isort 5.0.0 through 5.0.4 has a bug that causes it to misinterpret certain "from ..." clauses that are not related to imports. Require 5.0.5 or greater. isort can be run with 'isort -c qemu' from the python root. Signed-off-by: John Snow Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa --- python/Pipfile | 1 + python/Pipfile.lock | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/python/Pipfile b/python/Pipfile index 51c537b0d10..75b96f29d87 100644 --- a/python/Pipfile +++ b/python/Pipfile @@ -5,6 +5,7 @@ verify_ssl =3D true =20 [dev-packages] flake8 =3D ">=3D3.6.0" +isort =3D ">=3D5.0.5" mypy =3D ">=3D0.770" pylint =3D ">=3D2.6.0" =20 diff --git a/python/Pipfile.lock b/python/Pipfile.lock index 5f8aab117c3..201e735c27a 100644 --- a/python/Pipfile.lock +++ b/python/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "65f010a8f2e55e9870d2b7e0d8af129516097d23abf2504f396= 552748b067ade" + "sha256": "b89c7a1b8a414f2a4cd708964123fb427d55419ee0b39e088bf= 2e7d4fbc11979" }, "pipfile-spec": 6, "requires": { @@ -46,7 +46,7 @@ "sha256:c729845434366216d320e936b8ad6f9d681aab72dc7cbc2d51= bedc3582f3ad1e", "sha256:fff4f0c04e1825522ce6949973e83110a6e907750cd92d128b= 0d14aaaadbffdc" ], - "markers": "python_version >=3D '3.6' and python_version < '4.= 0'", + "index": "pypi", "version": "=3D=3D5.7.0" }, "lazy-object-proxy": { --=20 2.29.2 From nobody Sun Feb 8 11:40:42 2026 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 ARC-Seal: i=1; a=rsa-sha256; t=1613677886; cv=none; d=zohomail.com; s=zohoarc; b=e+iWUxmBzoz+ppXr54bCjkPgtPcghdrnSWGw+1+hXDfuzKyvIHQsKwQMZPg/MLorrNFwjFBkPe1K2faAgVkv7lezexgkwedxCb7ANMMDkOvTqwm1KKZgtYe+Ua3wWrSX2X9FCDrUNDrUhs1xoZvwowfj6hIlNUKr/2XfmFDI7uo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613677886; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=6XlB5t9N0p1IVub0849dZGu3RGLrXirym+uVz5W47SI=; b=kX0H6p9VxfkKuyTWfJu/kPjwyL3c1Nw1okf+0ySx1lyk2j7cPJJN6ZDpnwZ43WSkBJRW0urA+QYkfiKJMZe/XjpblxtPWpxxdKR2uvJQ+uQ5iR10Kwd+LERv3vhD+l+GThFIBVb9p9Xwqf9FWfKRguFd12g7aybziwqS0t3FVfc= ARC-Authentication-Results: i=1; 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 header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1613677886497567.3845430849648; Thu, 18 Feb 2021 11:51:26 -0800 (PST) Received: from localhost ([::1]:46556 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lCpKf-0006b1-Dd for importer@patchew.org; Thu, 18 Feb 2021 14:51:25 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35420) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lCoyW-0003Ip-BC for qemu-devel@nongnu.org; Thu, 18 Feb 2021 14:28:33 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:37820) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lCoyO-0003gx-FY for qemu-devel@nongnu.org; Thu, 18 Feb 2021 14:28:32 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-237-qPsKvE_JPc--u4UORxQSgw-1; Thu, 18 Feb 2021 14:28:20 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A80C7427CD; Thu, 18 Feb 2021 19:28:19 +0000 (UTC) Received: from scv.redhat.com (ovpn-112-247.rdu2.redhat.com [10.10.112.247]) by smtp.corp.redhat.com (Postfix) with ESMTP id 61D6560BE5; Thu, 18 Feb 2021 19:28:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613676502; 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=6XlB5t9N0p1IVub0849dZGu3RGLrXirym+uVz5W47SI=; b=SOLvaf/kMc4YbaMEKvS+x+kEvjhclUiO4J8R2X4NMG/QUnbLy+yRPevtEEiHtXT7GYBo8B lZCVfCLahSGoG/GSt5xJp0OJKHnQkdwc2BWKBJ0udFpzQgX1LilL520tQqk4nJc/qaglzW sO7AVMY3CgqxlkdXzBqLv61/51O2COo= X-MC-Unique: qPsKvE_JPc--u4UORxQSgw-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v5 19/25] python/qemu: add qemu package itself to pipenv Date: Thu, 18 Feb 2021 14:27:27 -0500 Message-Id: <20210218192733.370968-20-jsnow@redhat.com> In-Reply-To: <20210218192733.370968-1-jsnow@redhat.com> References: <20210218192733.370968-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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=216.205.24.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Kevin Wolf , Thomas Huth , Beraldo Leal , qemu-block@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Max Reitz , Willian Rampazzo , Cleber Rosa , John Snow , Eduardo Habkost Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" This adds the python qemu packages themselves to the pipenv manifest. 'pipenv sync' will create a virtual environment sufficient to use the SDK. 'pipenv sync --dev' will create a virtual environment sufficient to use and test the SDK (with pylint, mypy, isort, flake8, etc.) The qemu packages are installed in 'editable' mode; all changes made to the python package inside the git tree will be reflected in the installed package without reinstallation. This includes changes made via git pull and so on. Signed-off-by: John Snow Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa --- python/Pipfile | 1 + python/Pipfile.lock | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/python/Pipfile b/python/Pipfile index 75b96f29d87..214fb175e7a 100644 --- a/python/Pipfile +++ b/python/Pipfile @@ -10,6 +10,7 @@ mypy =3D ">=3D0.770" pylint =3D ">=3D2.6.0" =20 [packages] +qemu =3D {editable =3D true,path =3D "."} =20 [requires] python_version =3D "3.6" diff --git a/python/Pipfile.lock b/python/Pipfile.lock index 201e735c27a..4b4402f49e5 100644 --- a/python/Pipfile.lock +++ b/python/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "b89c7a1b8a414f2a4cd708964123fb427d55419ee0b39e088bf= 2e7d4fbc11979" + "sha256": "e38d142c3fadc2f2ed849e86f7ebd14e25974dc12228751490a= ef5a9ee074f2f" }, "pipfile-spec": 6, "requires": { @@ -15,7 +15,12 @@ } ] }, - "default": {}, + "default": { + "qemu": { + "editable": true, + "path": "." + } + }, "develop": { "astroid": { "hashes": [ --=20 2.29.2 From nobody Sun Feb 8 11:40:42 2026 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 ARC-Seal: i=1; a=rsa-sha256; t=1613678092; cv=none; d=zohomail.com; s=zohoarc; b=mY3k+X7ybpVUaw96un80rGriOXDMCNftyXIfVZz10N1LyXgnt+AG/TmUwWJoqDQhw2EdQs5tArKS7gcl30wi6ql/gLLAp1/WU/1gQg/acoRKQQCwDyWDIcOKpO3fVhmioWRJ6bRL4T1reZc1KNvkGgl6rS/uXtZ8W4jCiTp7bpc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613678092; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=rs1meewvsZqY9lPM433+/Kk3iuZTDlNKkElx/Lliku0=; b=Ivzffrl1wPxTGD+XWVK+R99jeqNqeg2euV5/MInebNTGrj6QQ0/UVXYdC1f1igy5GsZQ23AVXD9m3X+RJ+fXxzMXFPLRzOs+OhlgQkaYy4aYkbHGCUFx1H74ZE7R93rArk6ScGV/Pk+1TPhPcd3Mg5a1vAH9oCL1md74eDp4m98= ARC-Authentication-Results: i=1; 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 header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1613678091902982.3900587050387; Thu, 18 Feb 2021 11:54:51 -0800 (PST) Received: from localhost ([::1]:56054 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lCpNy-0002A5-L4 for importer@patchew.org; Thu, 18 Feb 2021 14:54:50 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35498) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lCoyf-0003Kq-Rn for qemu-devel@nongnu.org; Thu, 18 Feb 2021 14:28:41 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:25779) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lCoyY-0003kJ-Vu for qemu-devel@nongnu.org; Thu, 18 Feb 2021 14:28:41 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-210-lOGfqe-OMPSLQBSI5iPYXg-1; Thu, 18 Feb 2021 14:28:30 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7BDE7107AFD1; Thu, 18 Feb 2021 19:28:29 +0000 (UTC) Received: from scv.redhat.com (ovpn-112-247.rdu2.redhat.com [10.10.112.247]) by smtp.corp.redhat.com (Postfix) with ESMTP id C8BAB60C61; Thu, 18 Feb 2021 19:28:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613676512; 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=rs1meewvsZqY9lPM433+/Kk3iuZTDlNKkElx/Lliku0=; b=LoBu/9HVWr3SORkb+pUI9jOFKJNlS5acD1v4kjAddsZHDXeMudHdAyyvcMF7nmT0nQZOBY giwT41GvHVDGe8CmQvd15R1bD9lwZn7gWddU41xv2UcY0FBLm9+/ZCJJt7/sNxn/iptSLE VjBUuox0dl+YjJoiaAoJwYvCjA/ZSgI= X-MC-Unique: lOGfqe-OMPSLQBSI5iPYXg-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v5 20/25] python: add devel package requirements to setuptools Date: Thu, 18 Feb 2021 14:27:28 -0500 Message-Id: <20210218192733.370968-21-jsnow@redhat.com> In-Reply-To: <20210218192733.370968-1-jsnow@redhat.com> References: <20210218192733.370968-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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=63.128.21.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H4=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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Kevin Wolf , Thomas Huth , Beraldo Leal , qemu-block@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Max Reitz , Willian Rampazzo , Cleber Rosa , John Snow , Eduardo Habkost Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" setuptools doesn't have a formal understanding of development requires, but it has an optional feataures section. Fine; add a "devel" feature and add the requirements to it. To avoid duplication, we can modify pipenv to install qemu[devel] instead. This enables us to run invocations like "pip install -e .[devel]" and test the package on bleeding-edge packages beyond those specified in Pipfile.lock. Importantly, this also allows us to install the qemu development packages in a non-networked mode: `pip3 install --no-index -e .[devel]` will now fail if the proper development dependencies are not already met. This can be useful for automated build scripts where fetching network packages may be undesirable. Signed-off-by: John Snow --- python/Pipfile | 5 +---- python/Pipfile.lock | 14 +++++++++----- python/setup.cfg | 9 +++++++++ 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/python/Pipfile b/python/Pipfile index 214fb175e7a..e7acb8cefa4 100644 --- a/python/Pipfile +++ b/python/Pipfile @@ -4,10 +4,7 @@ url =3D "https://pypi.org/simple" verify_ssl =3D true =20 [dev-packages] -flake8 =3D ">=3D3.6.0" -isort =3D ">=3D5.0.5" -mypy =3D ">=3D0.770" -pylint =3D ">=3D2.6.0" +qemu =3D {editable =3D true, extras =3D ["devel"], path =3D "."} =20 [packages] qemu =3D {editable =3D true,path =3D "."} diff --git a/python/Pipfile.lock b/python/Pipfile.lock index 4b4402f49e5..85b3124a491 100644 --- a/python/Pipfile.lock +++ b/python/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "e38d142c3fadc2f2ed849e86f7ebd14e25974dc12228751490a= ef5a9ee074f2f" + "sha256": "eff562a688ebc6f3ffe67494dbb804b883e2159ad81c4d55d96= da9f7aec13e91" }, "pipfile-spec": 6, "requires": { @@ -35,7 +35,7 @@ "sha256:749dbbd6bfd0cf1318af27bf97a14e28e5ff548ef8e5b1566c= cfb25a11e7c839", "sha256:aadae8761ec651813c24be05c6f7b4680857ef6afaae4651a4= eccaef97ce6c3b" ], - "index": "pypi", + "markers": "python_version >=3D '2.7' and python_version not i= n '3.0, 3.1, 3.2, 3.3'", "version": "=3D=3D3.8.4" }, "importlib-metadata": { @@ -51,7 +51,7 @@ "sha256:c729845434366216d320e936b8ad6f9d681aab72dc7cbc2d51= bedc3582f3ad1e", "sha256:fff4f0c04e1825522ce6949973e83110a6e907750cd92d128b= 0d14aaaadbffdc" ], - "index": "pypi", + "markers": "python_version >=3D '3.6' and python_version < '4.= 0'", "version": "=3D=3D5.7.0" }, "lazy-object-proxy": { @@ -113,7 +113,7 @@ "sha256:e497a544391f733eca922fdcb326d19e894789cd4ff61d48b4= b195776476c5cf", "sha256:f5fdf935a46aa20aa937f2478480ebf4be9186e98e49cc3843= af9a5795a49a25" ], - "index": "pypi", + "markers": "python_version >=3D '3.5'", "version": "=3D=3D0.800" }, "mypy-extensions": { @@ -144,9 +144,13 @@ "sha256:bb4a908c9dadbc3aac18860550e870f58e1a02c9f2c204fdf5= 693d73be061210", "sha256:bfe68f020f8a0fece830a22dd4d5dddb4ecc6137db04face4c= 3420a46a52239f" ], - "index": "pypi", + "markers": "python_version >=3D '3.5'", "version": "=3D=3D2.6.0" }, + "qemu": { + "editable": true, + "path": "." + }, "six": { "hashes": [ "sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8b= afd8ce11080259", diff --git a/python/setup.cfg b/python/setup.cfg index 8a2c200a581..6eb9f62d5d9 100644 --- a/python/setup.cfg +++ b/python/setup.cfg @@ -19,6 +19,15 @@ classifiers =3D python_requires =3D >=3D 3.6 packages =3D find_namespace: =20 +[options.extras_require] +# Run `pipenv lock` when changing these requirements. +devel =3D + flake8 >=3D 3.6.0 + isort >=3D 5.0.5 + mypy >=3D 0.770 + pylint >=3D 2.6.0 + + [flake8] extend-ignore =3D E722 # Prefer pylint's bare-except checks to flake8's exclude =3D __pycache__, --=20 2.29.2 From nobody Sun Feb 8 11:40:42 2026 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 ARC-Seal: i=1; a=rsa-sha256; t=1613678261; cv=none; d=zohomail.com; s=zohoarc; b=YGzWANgHk1jqjd8kmuW4t16xIbtMMm4jv0sElQB5arj4TZgzOei8rIisshQFNSRpH1gUCum7BGmoKLc3fQO7bmnwCW2qwsi0RVUuvYhE05UT0Rx72kRKfUm5lK4hNhtLlFnUgxH0e1mTIYHT/yQys2BM+FK1h1yIsS7w+nFB+8c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613678261; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=s945iKAdmxd9yvxyl19X1C3rtu3vRBNHRGwe6vHDw04=; b=RJ5nxBNj3GnGmPy4gQjMtOJ/rSvSJRu8xcQJ07JMWjxEiMBaQ5P61ieXcC8i9tpueZJI/zfIhcOdp4a1dRAgkoAnfLOW9ScvzG6o5FYve1EoEOXcbEbue64v0Jy75lD8s4zF55u7jVlyDAcg5k3NDU6KiODlUZvqajJWoN+D71Y= ARC-Authentication-Results: i=1; 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 header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 161367826151483.9920336745065; Thu, 18 Feb 2021 11:57:41 -0800 (PST) Received: from localhost ([::1]:33740 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lCpQi-0004gM-Es for importer@patchew.org; Thu, 18 Feb 2021 14:57:40 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35496) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lCoyf-0003Kp-RV for qemu-devel@nongnu.org; Thu, 18 Feb 2021 14:28:41 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:56696) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lCoyZ-0003kq-Br for qemu-devel@nongnu.org; Thu, 18 Feb 2021 14:28:41 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-101-HqhjGzaqO0uEQeKuWZLENw-1; Thu, 18 Feb 2021 14:28:32 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BFDAD84E240; Thu, 18 Feb 2021 19:28:30 +0000 (UTC) Received: from scv.redhat.com (ovpn-112-247.rdu2.redhat.com [10.10.112.247]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7C15560BE5; Thu, 18 Feb 2021 19:28:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613676514; 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=s945iKAdmxd9yvxyl19X1C3rtu3vRBNHRGwe6vHDw04=; b=fm7B7i2MT36vH4ReQFNNSJqNDqofbGgd7SzVTXym/phxux8/j57SDTJ7IV2l48P481RMLP ogRZRFZT6G94G0FY/zmaKcX8mO6O4VWluqUSbtOgpPgY3QMqTr44e5s2/xoOKLJk7YeSjU eg9jfRt6Dp6T/htjqZ8NHlPXMO+4cKk= X-MC-Unique: HqhjGzaqO0uEQeKuWZLENw-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v5 21/25] python: add pytest and tests Date: Thu, 18 Feb 2021 14:27:29 -0500 Message-Id: <20210218192733.370968-22-jsnow@redhat.com> In-Reply-To: <20210218192733.370968-1-jsnow@redhat.com> References: <20210218192733.370968-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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=216.205.24.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Kevin Wolf , Thomas Huth , Beraldo Leal , qemu-block@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Max Reitz , Willian Rampazzo , Cleber Rosa , John Snow , Eduardo Habkost Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Try using pytest to manage our various tests; even though right now they're only invoking binaries and not really running any python-native code. Create tests/, and add test_lint.py which calls out to mypy, flake8, pylint and isort to enforce the standards in this directory. Add pytest to the setup.cfg development dependencies; add a pytest configuration section as well; run it in verbose mode. Finally, add pytest to the Pipfile environment and lock the new dependencies. Provided you have the right development dependencies (mypy, flake8, isort, pylint, and now pytest) You should be able to run "pytest" from the python folder to run all of these linters with the correct arguments. Signed-off-by: John Snow --- python/Pipfile.lock | 57 ++++++++++++++++++++++++++++++++++++++- python/setup.cfg | 5 ++++ python/tests/test_lint.py | 28 +++++++++++++++++++ 3 files changed, 89 insertions(+), 1 deletion(-) create mode 100644 python/tests/test_lint.py diff --git a/python/Pipfile.lock b/python/Pipfile.lock index 85b3124a491..0fa1a14a9b2 100644 --- a/python/Pipfile.lock +++ b/python/Pipfile.lock @@ -30,6 +30,14 @@ "markers": "python_version >=3D '3.5'", "version": "=3D=3D2.4.2" }, + "attrs": { + "hashes": [ + "sha256:31b2eced602aa8423c2aea9c76a724617ed67cf9513173fd3a= 4f03e3a929c7e6", + "sha256:832aa3cde19744e49938b91fea06d69ecb9e649c93ba974535= d08ad92164f700" + ], + "markers": "python_version >=3D '2.7' and python_version not i= n '3.0, 3.1, 3.2, 3.3'", + "version": "=3D=3D20.3.0" + }, "flake8": { "hashes": [ "sha256:749dbbd6bfd0cf1318af27bf97a14e28e5ff548ef8e5b1566c= cfb25a11e7c839", @@ -43,9 +51,16 @@ "sha256:ace61d5fc652dc280e7b6b4ff732a9c2d40db2c0f92bc6cb74= e07b73d53a1771", "sha256:fa5daa4477a7414ae34e95942e4dd07f62adf589143c875c13= 3c1e53c4eff38d" ], - "markers": "python_version < '3.8'", + "markers": "python_version < '3.8' and python_version < '3.8'", "version": "=3D=3D3.4.0" }, + "iniconfig": { + "hashes": [ + "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53= bc4f35ee9da8b3", + "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d= 4a313df4b37f32" + ], + "version": "=3D=3D1.1.1" + }, "isort": { "hashes": [ "sha256:c729845434366216d320e936b8ad6f9d681aab72dc7cbc2d51= bedc3582f3ad1e", @@ -123,6 +138,30 @@ ], "version": "=3D=3D0.4.3" }, + "packaging": { + "hashes": [ + "sha256:5b327ac1320dc863dca72f4514ecc086f31186744b84a23037= 4cc1fd776feae5", + "sha256:67714da7f7bc052e064859c05c595155bd1ee9f69f76557e21= f051443c20947a" + ], + "markers": "python_version >=3D '2.7' and python_version not i= n '3.0, 3.1, 3.2, 3.3'", + "version": "=3D=3D20.9" + }, + "pluggy": { + "hashes": [ + "sha256:15b2acde666561e1298d71b523007ed7364de07029219b604c= f808bfa1c765b0", + "sha256:966c145cd83c96502c3c3868f50408687b38434af77734af1e= 9ca461a4081d2d" + ], + "markers": "python_version >=3D '2.7' and python_version not i= n '3.0, 3.1, 3.2, 3.3'", + "version": "=3D=3D0.13.1" + }, + "py": { + "hashes": [ + "sha256:21b81bda15b66ef5e1a777a21c4dcd9c20ad3efd0b3f817e7a= 809035269e1bd3", + "sha256:3b80836aa6d1feeaa108e046da6423ab8f6ceda6468545ae8d= 02d9d58d18818a" + ], + "markers": "python_version >=3D '2.7' and python_version not i= n '3.0, 3.1, 3.2, 3.3'", + "version": "=3D=3D1.10.0" + }, "pycodestyle": { "hashes": [ "sha256:2295e7b2f6b5bd100585ebcb1f616591b652db8a741695b3d8= f5d28bdc934367", @@ -147,6 +186,22 @@ "markers": "python_version >=3D '3.5'", "version": "=3D=3D2.6.0" }, + "pyparsing": { + "hashes": [ + "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ea= d507bc3246ecc1", + "sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb124= 0a85b024efc88b" + ], + "markers": "python_version >=3D '2.6' and python_version not i= n '3.0, 3.1, 3.2'", + "version": "=3D=3D2.4.7" + }, + "pytest": { + "hashes": [ + "sha256:9d1edf9e7d0b84d72ea3dbcdfd22b35fb543a5e8f2a60092dd= 578936bf63d7f9", + "sha256:b574b57423e818210672e07ca1fa90aaf194a4f63f3ab909a2= c67ebb22913839" + ], + "markers": "python_version >=3D '3.6'", + "version": "=3D=3D6.2.2" + }, "qemu": { "editable": true, "path": "." diff --git a/python/setup.cfg b/python/setup.cfg index 6eb9f62d5d9..2c12d9ab89b 100644 --- a/python/setup.cfg +++ b/python/setup.cfg @@ -26,6 +26,7 @@ devel =3D isort >=3D 5.0.5 mypy >=3D 0.770 pylint >=3D 2.6.0 + pytest >=3D 3.0.0 =20 =20 [flake8] @@ -75,3 +76,7 @@ include_trailing_comma=3DTrue line_length=3D72 lines_after_imports=3D2 multi_line_output=3D3 + +[tool:pytest] +addopts =3D -v +console_output_style =3D count diff --git a/python/tests/test_lint.py b/python/tests/test_lint.py new file mode 100644 index 00000000000..38fefa01c66 --- /dev/null +++ b/python/tests/test_lint.py @@ -0,0 +1,28 @@ +import subprocess + + +def _external_test(command_line: str) -> None: + args =3D command_line.split(' ') + try: + subprocess.run(args, check=3DTrue) + except subprocess.CalledProcessError as err: + # Re-contextualize to avoid pytest showing error context inside + # the subprocess module itself + raise Exception("'{:s}' returned {:d}".format( + ' '.join(args), err.returncode)) from None + + +def test_isort() -> None: + _external_test('isort -c qemu') + + +def test_flake8() -> None: + _external_test('flake8') + + +def test_pylint() -> None: + _external_test('pylint qemu') + + +def test_mypy() -> None: + _external_test('mypy -p qemu') --=20 2.29.2 From nobody Sun Feb 8 11:40:42 2026 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 1613678435692877.324359079158; Thu, 18 Feb 2021 12:00:35 -0800 (PST) Received: from localhost ([::1]:40634 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lCpTS-0007eS-P4 for importer@patchew.org; Thu, 18 Feb 2021 15:00:30 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35512) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lCoyg-0003L6-3k for qemu-devel@nongnu.org; Thu, 18 Feb 2021 14:28:42 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:41015) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lCoya-0003lH-4H for qemu-devel@nongnu.org; Thu, 18 Feb 2021 14:28:41 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-390-wkCM5MuzOb2ToU1xXQUAPA-1; Thu, 18 Feb 2021 14:28:33 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2FF7E427C5; Thu, 18 Feb 2021 19:28:32 +0000 (UTC) Received: from scv.redhat.com (ovpn-112-247.rdu2.redhat.com [10.10.112.247]) by smtp.corp.redhat.com (Postfix) with ESMTP id E1ADA60BE5; Thu, 18 Feb 2021 19:28:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613676515; 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=AZ+BLflgz3b1FOOZUiWwu0ajuyL3u2UE+NehfGaJnLs=; b=eUjTTOmbMCZux7+Xlso52JYPqjm9DRYNNbHaIysq7Iiw9pvSowQ3qViSL7KZtUUGKzeVHY GSEaV4hubq0rZu/Vx/U8I7LLsrDSVm4QBTfugggKeQph3qpXsQKcGz6rfFuTMuDJ+yomOV rMf7o2/K/HJv2zr1YrhNac70jGsDWAU= X-MC-Unique: wkCM5MuzOb2ToU1xXQUAPA-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v5 22/25] python: add Makefile for some common tasks Date: Thu, 18 Feb 2021 14:27:30 -0500 Message-Id: <20210218192733.370968-23-jsnow@redhat.com> In-Reply-To: <20210218192733.370968-1-jsnow@redhat.com> References: <20210218192733.370968-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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=63.128.21.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H4=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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Kevin Wolf , Thomas Huth , Beraldo Leal , qemu-block@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Max Reitz , Willian Rampazzo , Cleber Rosa , John Snow , Eduardo Habkost Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Add "make venv" to create the pipenv-managed virtual environment that contains our explicitly pinned dependencies. Add "make check" to run the python linters [in the host execution environment]. Add "make venv-check" which combines the above two: create/update the venv, then run the linters in that explicitly managed environment. make clean: delete miscellaneous build output possibly created by pipenv, pip, or other python packaging utilities make distclean: delete the above, the .venv, and the editable "qemu" package forwarder (qemu.egg-info) if there is one. Signed-off-by: John Snow --- python/Makefile | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 python/Makefile diff --git a/python/Makefile b/python/Makefile new file mode 100644 index 00000000000..47940846400 --- /dev/null +++ b/python/Makefile @@ -0,0 +1,37 @@ +.PHONY: help venv venv-check check clean distclean + +help: + @echo "python packaging help:" + @echo "" + @echo "make venv: Create pipenv's virtual environment." + @echo " NOTE: Requires Python 3.6 and pipenv." + @echo " Will download packages from PyPI." + @echo " Hint: (On Fedora): 'sudo dnf install python36 pipenv'" + @echo "" + @echo "make venv-check: run linters using pipenv's virtual environment." + @echo " Hint: If you don't know which test to run, run this one!" + @echo "" + @echo "make check: run linters using the current environment." + @echo " Hint: Install deps with: 'pip install \".[devel]\"'" + @echo "" + @echo "make clean: remove build output." + @echo "" + @echo "make distclean: remove venv files, qemu package forwarder, and" + @echo " everything from 'make clean'." + +venv: .venv +.venv: Pipfile.lock + @PIPENV_VENV_IN_PROJECT=3D1 pipenv sync --dev --keep-outdated + @touch .venv + +venv-check: venv + @pipenv run make check + +check: + @pytest + +clean: + rm -rf build/ dist/ + +distclean: clean + rm -rf qemu.egg-info/ .venv --=20 2.29.2 From nobody Sun Feb 8 11:40:42 2026 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 1613677192503949.9149136308704; Thu, 18 Feb 2021 11:39:52 -0800 (PST) Received: from localhost ([::1]:51270 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lCp9T-0004sp-Fc for importer@patchew.org; Thu, 18 Feb 2021 14:39:51 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35538) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lCoyh-0003MM-67 for qemu-devel@nongnu.org; Thu, 18 Feb 2021 14:28:43 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:40080) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lCoyf-0003mf-IJ for qemu-devel@nongnu.org; Thu, 18 Feb 2021 14:28:42 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-596-tN3YCNQaOn6u5VFaK6Wpzw-1; Thu, 18 Feb 2021 14:28:37 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 65F861005501; Thu, 18 Feb 2021 19:28:36 +0000 (UTC) Received: from scv.redhat.com (ovpn-112-247.rdu2.redhat.com [10.10.112.247]) by smtp.corp.redhat.com (Postfix) with ESMTP id 533FF60BE5; Thu, 18 Feb 2021 19:28:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613676519; 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=q32loMpCorhrTCAx86Wi07OVol2OdrfDkuDNPiSXX8Y=; b=Pex6RvtjCex4lX5z8AWutze2gnQvUzZTbL+Ni6T2RPKZB53oXGv/6gqRm+uCo2rDtL3Re9 slK3XSAqZTc8C7+5Sf+qnHno5Pn9a/cDHk/D9qaxRuFD+ZaNvab51lcCbLRpa1cu6agTvp 3+0l/e0lhSDTjudCNsAYJVLgpVCe9D4= X-MC-Unique: tN3YCNQaOn6u5VFaK6Wpzw-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v5 23/25] python: add .gitignore Date: Thu, 18 Feb 2021 14:27:31 -0500 Message-Id: <20210218192733.370968-24-jsnow@redhat.com> In-Reply-To: <20210218192733.370968-1-jsnow@redhat.com> References: <20210218192733.370968-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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=63.128.21.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H4=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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Kevin Wolf , Thomas Huth , Beraldo Leal , qemu-block@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Max Reitz , Willian Rampazzo , Cleber Rosa , John Snow , Eduardo Habkost Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Ignore *Python* build and package output (build, dist, qemu.egg-info); these files are not created as part of a QEMU build. Ignore miscellaneous cached python confetti (__pycache__, *.pyc, .mypy_cache). Ignore .idea (pycharm) and .venv (pipenv et al). Signed-off-by: John Snow --- python/.gitignore | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 python/.gitignore diff --git a/python/.gitignore b/python/.gitignore new file mode 100644 index 00000000000..78c522768bc --- /dev/null +++ b/python/.gitignore @@ -0,0 +1,9 @@ +*.pyc +.idea/ +.mypy_cache/ +.pytest_cache/ +.venv/ +__pycache__/ +build/ +dist/ +qemu.egg-info/ --=20 2.29.2 From nobody Sun Feb 8 11:40:42 2026 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 1613678690385912.2503532299716; Thu, 18 Feb 2021 12:04:50 -0800 (PST) Received: from localhost ([::1]:47308 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lCpXc-00036d-Ua for importer@patchew.org; Thu, 18 Feb 2021 15:04:48 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35596) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lCoyk-0003Pm-VF for qemu-devel@nongnu.org; Thu, 18 Feb 2021 14:28:47 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:60032) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lCoyi-0003oi-5y for qemu-devel@nongnu.org; Thu, 18 Feb 2021 14:28:46 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-592-oDvUM8dpOcO_R73wsXH8Qg-1; Thu, 18 Feb 2021 14:28:41 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 96DEA427C3; Thu, 18 Feb 2021 19:28:40 +0000 (UTC) Received: from scv.redhat.com (ovpn-112-247.rdu2.redhat.com [10.10.112.247]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8971960BE5; Thu, 18 Feb 2021 19:28:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613676523; 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=vO4jAdZ2zeluSxNEM3YgyuJD6HwZChhJ7FbxxbMNAsU=; b=VaU95/4voguFK8TCRsmo2YMrnVfRS9SWNwtNhwrtsIKwDh0K5J+Y9U2o5VAMI9MvM5ceI5 RmfCUN3pxehHS4yNYC4j5rG4BUidfWXQzc43RMYxDrNVx6bV1NxYWdN2agq6ZkJBd9VJoJ Mgad4DItuZLmrOCz7PB4IIe2lDF80XM= X-MC-Unique: oDvUM8dpOcO_R73wsXH8Qg-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v5 24/25] gitlab: add python linters to CI Date: Thu, 18 Feb 2021 14:27:32 -0500 Message-Id: <20210218192733.370968-25-jsnow@redhat.com> In-Reply-To: <20210218192733.370968-1-jsnow@redhat.com> References: <20210218192733.370968-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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=63.128.21.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Kevin Wolf , Thomas Huth , Beraldo Leal , qemu-block@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Max Reitz , Willian Rampazzo , Cleber Rosa , John Snow , Eduardo Habkost Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Add python3.6 to the fedora container image: we need it to run the linters against that explicit version to make sure we don't break our minimum version promise. Add pipenv so that we can fetch precise versions of pip packages we need to guarantee test reproducability. Signed-off-by: John Snow --- .gitlab-ci.yml | 10 ++++++++++ tests/docker/dockerfiles/fedora.docker | 2 ++ 2 files changed, 12 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7adb9a4cef0..8dc4de9b168 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -665,6 +665,16 @@ check-patch: GIT_DEPTH: 1000 allow_failure: true =20 + +check-python: + stage: build + image: $CI_REGISTRY_IMAGE/qemu/fedora:latest + script: + - cd python + - make venv-check + variables: + GIT_DEPTH: 1000 + check-dco: stage: build image: $CI_REGISTRY_IMAGE/qemu/centos8:latest diff --git a/tests/docker/dockerfiles/fedora.docker b/tests/docker/dockerfi= les/fedora.docker index 0d7602abbeb..1262b8c5e03 100644 --- a/tests/docker/dockerfiles/fedora.docker +++ b/tests/docker/dockerfiles/fedora.docker @@ -84,6 +84,7 @@ ENV PACKAGES \ numactl-devel \ perl \ perl-Test-Harness \ + pipenv \ pixman-devel \ python3 \ python3-PyYAML \ @@ -93,6 +94,7 @@ ENV PACKAGES \ python3-pip \ python3-sphinx \ python3-virtualenv \ + python3.6 \ rdma-core-devel \ SDL2-devel \ snappy-devel \ --=20 2.29.2 From nobody Sun Feb 8 11:40:42 2026 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 ARC-Seal: i=1; a=rsa-sha256; t=1613678043; cv=none; d=zohomail.com; s=zohoarc; b=T3qZOKusZr2ekxF5EUJYuH+n8GsBkQ6UjJEYxVRn422HfBqCXz5w6UEwozFITdhNP+/ynZGKucsHYhJ67pRWoxTqTV03VeoS2jR5m0oOYeYwBhGyT1YCbqFSYlxPpfbLE6uLrDGPAU6PHbpl8/Pzpxdv0Tabho4gJf4Do4brIxY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613678043; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=8nrmbBXj6FDogwE0Ur8lSKvcU461oLv26GXq1Yit3y8=; b=nVUTswKO2wVmAYVebJJUIcjbNLpltfcNC4PP775X2D3LkQtahl6wGf7VNFyRXHGYcKnKEOa5V8N3s3fpI1lepOFY+D2XzJ8CDQwoiTc2Oa45dJ9N75Vp+BIQQnZaeNZUb7jNLuJXj24GKQH4tzNd2z4KsHhNsBGPg/cZ8A/NXnM= ARC-Authentication-Results: i=1; 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 header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1613678043286500.15033358921676; Thu, 18 Feb 2021 11:54:03 -0800 (PST) Received: from localhost ([::1]:54096 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lCpNC-0001MY-7n for importer@patchew.org; Thu, 18 Feb 2021 14:54:02 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35602) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lCoym-0003RF-AG for qemu-devel@nongnu.org; Thu, 18 Feb 2021 14:28:49 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:60934) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lCoyj-0003pN-NX for qemu-devel@nongnu.org; Thu, 18 Feb 2021 14:28:48 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-175-I8wgQ0r8Pq2GLcnl9fnvvg-1; Thu, 18 Feb 2021 14:28:43 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0561318A2AE2; Thu, 18 Feb 2021 19:28:42 +0000 (UTC) Received: from scv.redhat.com (ovpn-112-247.rdu2.redhat.com [10.10.112.247]) by smtp.corp.redhat.com (Postfix) with ESMTP id B7AE160BE5; Thu, 18 Feb 2021 19:28:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613676525; 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=8nrmbBXj6FDogwE0Ur8lSKvcU461oLv26GXq1Yit3y8=; b=PIJOZ7m90AOjSzzlFLBzyFnFba0D0WkqhCkrxGodZYICncIVUvDDWeKyKgsLnk1pkziVqd wNxj1G+jk4Yb/RuLc2/w82TQzF7GYyW+cIBlC7q/xzh7oHF2pC3VlLSBkFy9DYy3+jM5fl KflGBL762nZC8VwX3gHnkkdIhZexz9E= X-MC-Unique: I8wgQ0r8Pq2GLcnl9fnvvg-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v5 25/25] python: add 'make develop' target Date: Thu, 18 Feb 2021 14:27:33 -0500 Message-Id: <20210218192733.370968-26-jsnow@redhat.com> In-Reply-To: <20210218192733.370968-1-jsnow@redhat.com> References: <20210218192733.370968-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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=216.205.24.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Kevin Wolf , Thomas Huth , Beraldo Leal , qemu-block@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Max Reitz , Willian Rampazzo , Cleber Rosa , John Snow , Eduardo Habkost Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Add a shortcut that canonizes the runes needed to get both the linting pre-requisites (the "[devel]" part), and the editable live-install (the "-e" part) of these python libraries. Signed-off-by: John Snow --- python/Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/python/Makefile b/python/Makefile index 47940846400..2699b77b072 100644 --- a/python/Makefile +++ b/python/Makefile @@ -1,4 +1,4 @@ -.PHONY: help venv venv-check check clean distclean +.PHONY: help venv venv-check check clean distclean develop =20 help: @echo "python packaging help:" @@ -11,8 +11,10 @@ help: @echo "make venv-check: run linters using pipenv's virtual environment." @echo " Hint: If you don't know which test to run, run this one!" @echo "" + @echo "make develop: Install deps for 'make check', and" + @echo " the qemu libs in editable/development mode." + @echo "" @echo "make check: run linters using the current environment." - @echo " Hint: Install deps with: 'pip install \".[devel]\"'" @echo "" @echo "make clean: remove build output." @echo "" @@ -27,6 +29,9 @@ venv: .venv venv-check: venv @pipenv run make check =20 +develop: + pip3 install -e .[devel] + check: @pytest =20 --=20 2.29.2