From nobody Sat May 18 23:55:12 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1625003243768439.85807447532056; Tue, 29 Jun 2021 14:47:23 -0700 (PDT) Received: from localhost ([::1]:34008 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyLZi-0007rA-O8 for importer@patchew.org; Tue, 29 Jun 2021 17:47:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37666) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyLW8-0000GA-WB for qemu-devel@nongnu.org; Tue, 29 Jun 2021 17:43:41 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:44281) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyLW6-0005fI-Bq for qemu-devel@nongnu.org; Tue, 29 Jun 2021 17:43:40 -0400 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-378-EdO1iMnNMwGuXBsZ6RvuXg-1; Tue, 29 Jun 2021 17:43:33 -0400 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 BBF0C1835AC5; Tue, 29 Jun 2021 21:43:32 +0000 (UTC) Received: from scv.redhat.com (ovpn-118-71.rdu2.redhat.com [10.10.118.71]) by smtp.corp.redhat.com (Postfix) with ESMTP id B647360C13; Tue, 29 Jun 2021 21:43:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625003017; 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=8AFwMd/IvOrS06R+jOgnr74N8V7Fx5meIpLSd4eLMdA=; b=IoNdYeHIr2hgXvE4U6nYSrGnU4HxXih7M0Fyg4AWF5v2LoZLrT3VrBrOPBJXJV5psr1eVY zO0pSGe/x/V798jntNWIRvGL431vMww9e89qb1oVogZpQ8EMKn7abbvrI0R/sH3wkgkG/8 G4b9jDXFtCR0lWxnvWOmbgMPYlz4pLc= X-MC-Unique: EdO1iMnNMwGuXBsZ6RvuXg-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v3 01/15] python/qom: Do not use 'err' name at module scope Date: Tue, 29 Jun 2021 17:43:09 -0400 Message-Id: <20210629214323.1329806-2-jsnow@redhat.com> In-Reply-To: <20210629214323.1329806-1-jsnow@redhat.com> References: <20210629214323.1329806-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=170.10.133.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.435, 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: Thomas Huth , Eduardo Habkost , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Willian Rampazzo , Cleber Rosa , John Snow Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Pylint updated to 2.9.0 upstream, adding new warnings for things that re-use the 'err' variable. Luckily, this only breaks the python-check-tox job, which is allowed to fail as a warning. Signed-off-by: John Snow Reviewed-by: Wainer dos Santos Moschetta Reviewed-by: Willian Rampazzo --- I guess that's good enough evidence that check-pipenv and check-tox both have their place :) Signed-off-by: John Snow --- python/qemu/qmp/qom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/qemu/qmp/qom.py b/python/qemu/qmp/qom.py index 7ec7843d57..8ff28a8343 100644 --- a/python/qemu/qmp/qom.py +++ b/python/qemu/qmp/qom.py @@ -38,8 +38,8 @@ =20 try: from .qom_fuse import QOMFuse -except ModuleNotFoundError as err: - if err.name !=3D 'fuse': +except ModuleNotFoundError as _err: + if _err.name !=3D 'fuse': raise else: assert issubclass(QOMFuse, QOMCommand) --=20 2.31.1 From nobody Sat May 18 23:55:12 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 162500308766519.78603279818458; Tue, 29 Jun 2021 14:44:47 -0700 (PDT) Received: from localhost ([::1]:54132 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyLXC-0002MS-DC for importer@patchew.org; Tue, 29 Jun 2021 17:44:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37650) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyLW8-0000Ft-C0 for qemu-devel@nongnu.org; Tue, 29 Jun 2021 17:43:40 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:41781) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyLW6-0005gB-Bm for qemu-devel@nongnu.org; Tue, 29 Jun 2021 17:43:40 -0400 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-440-b7plPcyoOXem5mXm0YgUBQ-1; Tue, 29 Jun 2021 17:43:34 -0400 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 EA26A1084F53; Tue, 29 Jun 2021 21:43:33 +0000 (UTC) Received: from scv.redhat.com (ovpn-118-71.rdu2.redhat.com [10.10.118.71]) by smtp.corp.redhat.com (Postfix) with ESMTP id E4D5760C13; Tue, 29 Jun 2021 21:43:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625003017; 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=mO6cT9DWGn6AvlSVpHL+QcqqeDXyFMM6BsbjivjrK0U=; b=MgmYER+bnjZbIfLFPY5RcSSCr3F3+pAIDHrhozyWFXvpQfdEoM//JIt8rDpFsAwYzup8wt xkTq61rVBkIRj4vDZzMEiN+3n2IcjTKT+sKeANYg/gRGZkDkcFFkkmkFwj52P0X6xlAhgx oXDYO97oNiURClqbV7aR6Nm6wDZjyHM= X-MC-Unique: b7plPcyoOXem5mXm0YgUBQ-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v3 02/15] python: expose typing information via PEP 561 Date: Tue, 29 Jun 2021 17:43:10 -0400 Message-Id: <20210629214323.1329806-3-jsnow@redhat.com> In-Reply-To: <20210629214323.1329806-1-jsnow@redhat.com> References: <20210629214323.1329806-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=170.10.133.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.435, 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: Thomas Huth , Eduardo Habkost , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Willian Rampazzo , Cleber Rosa , John Snow Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" https://www.python.org/dev/peps/pep-0561/#specification Create 'py.typed' files in each subpackage that indicate to mypy that this is a typed module, so that users of any of these packages can use mypy to check their code as well. Note: Theoretically it's possible to ditch MANIFEST.in in favor of using package_data in setup.cfg, but I genuinely could not figure out how to get it to include things from the *source root* into the *package root*; only how to include things from each subpackage. I tried! Signed-off-by: John Snow Reviewed-by: Willian Rampazzo Reviewed-by: Wainer dos Santos Moschetta --- python/qemu/machine/py.typed | 0 python/qemu/qmp/py.typed | 0 python/qemu/utils/py.typed | 0 python/setup.cfg | 4 ++++ 4 files changed, 4 insertions(+) create mode 100644 python/qemu/machine/py.typed create mode 100644 python/qemu/qmp/py.typed create mode 100644 python/qemu/utils/py.typed diff --git a/python/qemu/machine/py.typed b/python/qemu/machine/py.typed new file mode 100644 index 0000000000..e69de29bb2 diff --git a/python/qemu/qmp/py.typed b/python/qemu/qmp/py.typed new file mode 100644 index 0000000000..e69de29bb2 diff --git a/python/qemu/utils/py.typed b/python/qemu/utils/py.typed new file mode 100644 index 0000000000..e69de29bb2 diff --git a/python/setup.cfg b/python/setup.cfg index 85cecbb41b..db1639c1f2 100644 --- a/python/setup.cfg +++ b/python/setup.cfg @@ -19,6 +19,7 @@ classifiers =3D Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 + Typing :: Typed =20 [options] python_requires =3D >=3D 3.6 @@ -27,6 +28,9 @@ packages =3D qemu.machine qemu.utils =20 +[options.package_data] +* =3D py.typed + [options.extras_require] # Run `pipenv lock --dev` when changing these requirements. devel =3D --=20 2.31.1 From nobody Sat May 18 23:55:12 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1625003242353546.1551671732706; Tue, 29 Jun 2021 14:47:22 -0700 (PDT) Received: from localhost ([::1]:33868 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyLZh-0007m7-Bc for importer@patchew.org; Tue, 29 Jun 2021 17:47:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37676) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyLWA-0000IN-Hg for qemu-devel@nongnu.org; Tue, 29 Jun 2021 17:43:42 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:22199) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyLW6-0005fK-CD for qemu-devel@nongnu.org; Tue, 29 Jun 2021 17:43:42 -0400 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-158-BJUzBHP_N_2MRPE9meNZPg-1; Tue, 29 Jun 2021 17:43:36 -0400 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 3652815346; Tue, 29 Jun 2021 21:43:35 +0000 (UTC) Received: from scv.redhat.com (ovpn-118-71.rdu2.redhat.com [10.10.118.71]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1E9F860C13; Tue, 29 Jun 2021 21:43:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625003017; 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=LZAV0BMxzcjkPZA/fUmKVUcOwCJeaXKwTq+VTy5SQWw=; b=I8P1n1PJGU79rnXq+hgngDwjycH/fyQ9/R5dIRYLBzHLHar4cNFOSdS8uYZ576/Cy7Q4rv lBnROiQ6uG5BwlqeKVkiiqT5jDNL08FTVVNwbx4FV8kBg+c+xncVuUpTIlhZuRrVlKz5q8 TggtI/kO8znNGC8XM8IyRmAI4+fc2gM= X-MC-Unique: BJUzBHP_N_2MRPE9meNZPg-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v3 03/15] python: Remove global pylint suppressions Date: Tue, 29 Jun 2021 17:43:11 -0400 Message-Id: <20210629214323.1329806-4-jsnow@redhat.com> In-Reply-To: <20210629214323.1329806-1-jsnow@redhat.com> References: <20210629214323.1329806-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=170.10.133.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.435, 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: Thomas Huth , Eduardo Habkost , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Willian Rampazzo , Cleber Rosa , John Snow Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" These suppressions only apply to a small handful of places. Instead of disabling them globally, disable them just in the cases where we need. The design of the machine class grew quite organically with tons of constructor and class instance variables -- there's little chance of meaningfully refactoring it in the near term, so just suppress the warnings for that class. Signed-off-by: John Snow Reviewed-by: Willian Rampazzo Reviewed-by: Wainer dos Santos Moschetta --- python/qemu/machine/machine.py | 3 +++ python/qemu/machine/qtest.py | 2 ++ python/setup.cfg | 4 +--- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/python/qemu/machine/machine.py b/python/qemu/machine/machine.py index b62435528e..e3345dfa1b 100644 --- a/python/qemu/machine/machine.py +++ b/python/qemu/machine/machine.py @@ -84,6 +84,7 @@ class QEMUMachine: ... # vm is guaranteed to be shut down here """ + # pylint: disable=3Dtoo-many-instance-attributes, too-many-public-meth= ods =20 def __init__(self, binary: str, @@ -111,6 +112,8 @@ def __init__(self, @param console_log: (optional) path to console log file @note: Qemu process is not started until launch() is used. ''' + # pylint: disable=3Dtoo-many-arguments + # Direct user configuration =20 self._binary =3D binary diff --git a/python/qemu/machine/qtest.py b/python/qemu/machine/qtest.py index 93700684d1..d6d9c6a34a 100644 --- a/python/qemu/machine/qtest.py +++ b/python/qemu/machine/qtest.py @@ -116,6 +116,8 @@ def __init__(self, base_temp_dir: str =3D "/var/tmp", socket_scm_helper: Optional[str] =3D None, sock_dir: Optional[str] =3D None): + # pylint: disable=3Dtoo-many-arguments + if name is None: name =3D "qemu-%d" % os.getpid() if sock_dir is None: diff --git a/python/setup.cfg b/python/setup.cfg index db1639c1f2..524789d6e0 100644 --- a/python/setup.cfg +++ b/python/setup.cfg @@ -87,9 +87,7 @@ ignore_missing_imports =3D True # --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, +disable=3D =20 [pylint.basic] # Good variable names which should always be accepted, separated by a comm= a. --=20 2.31.1 From nobody Sat May 18 23:55:12 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1625003106535644.204600478158; Tue, 29 Jun 2021 14:45:06 -0700 (PDT) Received: from localhost ([::1]:54468 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyLXV-0002a4-8f for importer@patchew.org; Tue, 29 Jun 2021 17:45:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37670) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyLW9-0000GV-PK for qemu-devel@nongnu.org; Tue, 29 Jun 2021 17:43:41 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:45789) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyLW7-0005gQ-Hd for qemu-devel@nongnu.org; Tue, 29 Jun 2021 17:43:41 -0400 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-oFF3xDYuP3OdaErX5LI46Q-1; Tue, 29 Jun 2021 17:43:37 -0400 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 EE5011084F53; Tue, 29 Jun 2021 21:43:36 +0000 (UTC) Received: from scv.redhat.com (ovpn-118-71.rdu2.redhat.com [10.10.118.71]) by smtp.corp.redhat.com (Postfix) with ESMTP id 498E160C13; Tue, 29 Jun 2021 21:43:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625003019; 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=wb55Cfx8Rqu2zIREMMEaByk8sWdqFIBegxO7/S1qi1U=; b=OiqUAKfox3Jz0bJz2ghyonmbQWjOQMfVrCAYdn7l0gPfaboe7CFwyQU61lp6xfL2Dd049v 3bNlak3rxTJZNYM9LEAY+HZtG7GB6U1pNL8rZ38JqMww4dziUarXTp0j2JxLEZho2c7Iqx Zp6SwC0c1sfgjKjWrYct6u+xhlJcqBo= X-MC-Unique: oFF3xDYuP3OdaErX5LI46Q-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v3 04/15] python: Re-lock pipenv at *oldest* supported versions Date: Tue, 29 Jun 2021 17:43:12 -0400 Message-Id: <20210629214323.1329806-5-jsnow@redhat.com> In-Reply-To: <20210629214323.1329806-1-jsnow@redhat.com> References: <20210629214323.1329806-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=170.10.133.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.435, 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: Thomas Huth , Eduardo Habkost , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Willian Rampazzo , Cleber Rosa , John Snow Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" tox is already testing the most recent versions. Let's use pipenv to test the oldest versions we claim to support. This matches the stylistic choice to have pipenv always test our oldest supported Python version, 3.6. The effect of this is that the python-check-pipenv CI job on gitlab will now test against much older versions of these linters, which will help highlight incompatible changes that might otherwise go unnoticed. Update instructions for adding and bumping versions in setup.cfg. The reason for deleting the line that gets added to Pipfile is largely just to avoid having the version minimums specified in multiple places in config checked into the tree. (This patch was written by deleting Pipfile and Pipfile.lock, then explicitly installing each dependency manually at a specific version. Then, I restored the prior Pipfile and re-ran `pipenv lock --dev --keep-outdated` to re-add the qemu dependency back to the pipenv environment while keeping the "old" packages. It's annoying, yes, but I think the improvement to test coverage is worthwhile.) Signed-off-by: John Snow Reviewed-by: Willian Rampazzo Reviewed-by: Wainer dos Santos Moschetta --- python/Pipfile.lock | 113 +++++++++++++++++++++----------------------- python/setup.cfg | 4 +- 2 files changed, 56 insertions(+), 61 deletions(-) diff --git a/python/Pipfile.lock b/python/Pipfile.lock index 5bb3f1b635..8ab41a3f60 100644 --- a/python/Pipfile.lock +++ b/python/Pipfile.lock @@ -31,19 +31,19 @@ }, "astroid": { "hashes": [ - "sha256:4db03ab5fc3340cf619dbc25e42c2cc3755154ce6009469766= d7143d1fc2ee4e", - "sha256:8a398dfce302c13f14bab13e2b14fe385d32b73f4e4853b9bd= fb64598baa1975" + "sha256:09bdb456e02564731f8b5957cdd0c98a7f01d2db5e90eb1d79= 4c353c28bfd705", + "sha256:6a8a51f64dae307f6e0c9db752b66a7951e282389d8362cc1d= 39a56f3feeb31d" ], "markers": "python_version ~=3D '3.6'", - "version": "=3D=3D2.5.6" + "version": "=3D=3D2.6.0" }, "avocado-framework": { "hashes": [ - "sha256:42aa7962df98d6b78d4efd9afa2177226dc630f3d83a2a7d5b= af7a0a7da7fa1b", - "sha256:d96ae343abf890e1ef3b3a6af5ce49e35f6bded0715770c4ac= b325bca555c515" + "sha256:3fca7226d7d164f124af8a741e7fa658ff4345a0738ddc3290= 7631fd688b38ed", + "sha256:48ac254c0ae2ef0c0ceeb38e3d3df0388718eda8f48b3ab55b= 30b252839f42b1" ], - "markers": "python_version >=3D '3.6'", - "version": "=3D=3D88.1" + "index": "pypi", + "version": "=3D=3D87.0" }, "distlib": { "hashes": [ @@ -61,25 +61,27 @@ }, "flake8": { "hashes": [ - "sha256:07528381786f2a6237b061f6e96610a4167b226cb926e2aa2b= 6b1d78057c576b", - "sha256:bf8fd333346d844f616e8d47905ef3a3384edae6b4e9beb0c5= 101e25e3110907" + "sha256:6a35f5b8761f45c5513e3405f110a86bea57982c3b75b766ce= 7b65217abe1670", + "sha256:c01f8a3963b3571a8e6bd7a4063359aff90749e160778e0381= 7cd9b71c9e07d2" ], - "markers": "python_version >=3D '2.7' and python_version not i= n '3.0, 3.1, 3.2, 3.3, 3.4'", - "version": "=3D=3D3.9.2" + "index": "pypi", + "version": "=3D=3D3.6.0" }, "fusepy": { "hashes": [ - "sha256:72ff783ec2f43de3ab394e3f7457605bf04c8cf288a2f4068b= 4cde141d4ee6bd" + "sha256:10f5c7f5414241bffecdc333c4d3a725f1d6605cae6b4eaf86= a838ff49cdaf6c", + "sha256:a9f3a3699080ddcf0919fd1eb2cf743e1f5859ca54c2018632= f939bdfac269ee" ], - "version": "=3D=3D3.0.1" + "index": "pypi", + "version": "=3D=3D2.0.4" }, "importlib-metadata": { "hashes": [ - "sha256:8c501196e49fb9df5df43833bdb1e4328f64847763ec8a5070= 3148b73784d581", - "sha256:d7eb1dea6d6a6086f8be21784cc9e3bcfa55872b52309bc5fa= d53a8ea444465d" + "sha256:90bb658cdbbf6d1735b6341ce708fc7024a3e14e99ffdc5783= edea9f9b077f83", + "sha256:dc15b2969b4ce36305c51eebe62d418ac7791e9a157911d58b= fb1f9ccd8e2070" ], "markers": "python_version < '3.8'", - "version": "=3D=3D4.0.1" + "version": "=3D=3D1.7.0" }, "importlib-resources": { "hashes": [ @@ -91,11 +93,11 @@ }, "isort": { "hashes": [ - "sha256:0a943902919f65c5684ac4e0154b1ad4fac6dcaa5d9f3426b7= 32f1c8b5419be6", - "sha256:2bb1680aad211e3c9944dbce1d4ba09a989f04e238296c87fe= 2139faa26d655d" + "sha256:408e4d75d84f51b64d0824894afee44469eba34a4caee621dc= 53799f80d71ccc", + "sha256:64022dea6a06badfa09b300b4dfe8ba968114a737919e8ed50= aea1c288f078aa" ], - "markers": "python_version >=3D '3.6' and python_version < '4.= 0'", - "version": "=3D=3D5.8.0" + "index": "pypi", + "version": "=3D=3D5.1.2" }, "lazy-object-proxy": { "hashes": [ @@ -134,31 +136,23 @@ }, "mypy": { "hashes": [ - "sha256:0d0a87c0e7e3a9becdfbe936c981d32e5ee0ccda3e0f07e1ef= 2c3d1a817cf73e", - "sha256:25adde9b862f8f9aac9d2d11971f226bd4c8fbaa89fb76bdad= b267ef22d10064", - "sha256:28fb5479c494b1bab244620685e2eb3c3f988d71fd5d64cc75= 3195e8ed53df7c", - "sha256:2f9b3407c58347a452fc0736861593e105139b905cca7d097e= 413453a1d650b4", - "sha256:33f159443db0829d16f0a8d83d94df3109bb6dd801975fe86b= acb9bf71628e97", - "sha256:3f2aca7f68580dc2508289c729bd49ee929a436208d2b2b6aa= b15745a70a57df", - "sha256:499c798053cdebcaa916eef8cd733e5584b5909f789de856b4= 82cd7d069bdad8", - "sha256:4eec37370483331d13514c3f55f446fc5248d6373e7029a29e= cb7b7494851e7a", - "sha256:552a815579aa1e995f39fd05dde6cd378e191b063f031f2acf= e73ce9fb7f9e56", - "sha256:5873888fff1c7cf5b71efbe80e0e73153fe9212fafdf8e44ad= fe4c20ec9f82d7", - "sha256:61a3d5b97955422964be6b3baf05ff2ce7f26f52c85dd88db1= 1d5e03e146a3a6", - "sha256:674e822aa665b9fd75130c6c5f5ed9564a38c6cea6a6432ce4= 7eafb68ee578c5", - "sha256:7ce3175801d0ae5fdfa79b4f0cfed08807af4d075b402b7e29= 4e6aa72af9aa2a", - "sha256:9743c91088d396c1a5a3c9978354b61b0382b4e3c440ce83cf= 77994a43e8c521", - "sha256:9f94aac67a2045ec719ffe6111df543bac7874cee01f41928f= 6969756e030564", - "sha256:a26f8ec704e5a7423c8824d425086705e381b4f1dfdef6e3a1= edab7ba174ec49", - "sha256:abf7e0c3cf117c44d9285cc6128856106183938c68fd494476= 3003decdcfeb66", - "sha256:b09669bcda124e83708f34a94606e01b614fa71931d356c1f1= a5297ba11f110a", - "sha256:cd07039aa5df222037005b08fbbfd69b3ab0b0bd7a07d7906d= e75ae52c4e3119", - "sha256:d23e0ea196702d918b60c8288561e722bf437d82cb7ef2edcd= 98cfa38905d506", - "sha256:d65cc1df038ef55a99e617431f0553cd77763869eebdf90424= 03e16089fe746c", - "sha256:d7da2e1d5f558c37d6e8c1246f1aec1e7349e4913d8fb3cb28= 9a35de573fe2eb" + "sha256:15b948e1302682e3682f11f50208b726a246ab4e6c1b39f926= 4a8796bb416aa2", + "sha256:219a3116ecd015f8dca7b5d2c366c973509dfb9a8fc97ef044= a36e3da66144a1", + "sha256:3b1fc683fb204c6b4403a1ef23f0b1fac8e4477091585e0c8c= 54cbdf7d7bb164", + "sha256:3beff56b453b6ef94ecb2996bea101a08f1f8a9771d3cbf498= 8a61e4d9973761", + "sha256:7687f6455ec3ed7649d1ae574136835a4272b65b3ddcf01ab8= 704ac65616c5ce", + "sha256:7ec45a70d40ede1ec7ad7f95b3c94c9cf4c186a32f6bacb179= 5b60abd2f9ef27", + "sha256:86c857510a9b7c3104cf4cde1568f4921762c8f9842e987bc0= 3ed4f160925754", + "sha256:8a627507ef9b307b46a1fea9513d5c98680ba09591253082b4= c48697ba05a4ae", + "sha256:8dfb69fbf9f3aeed18afffb15e319ca7f8da9642336348ddd6= cab2713ddcf8f9", + "sha256:a34b577cdf6313bf24755f7a0e3f3c326d5c1f4fe7422d1d06= 498eb25ad0c600", + "sha256:a8ffcd53cb5dfc131850851cc09f1c44689c2812d0beb954d8= 138d4f5fc17f65", + "sha256:b90928f2d9eb2f33162405f32dde9f6dcead63a0971ca8a1b5= 0eb4ca3e35ceb8", + "sha256:c56ffe22faa2e51054c5f7a3bc70a370939c2ed4de308c690e= 7949230c995913", + "sha256:f91c7ae919bbc3f96cd5e5b2e786b2b108343d1d7972ea130f= 7de27fdd547cf3" ], - "markers": "python_version >=3D '3.5'", - "version": "=3D=3D0.812" + "index": "pypi", + "version": "=3D=3D0.770" }, "mypy-extensions": { "hashes": [ @@ -193,27 +187,26 @@ }, "pycodestyle": { "hashes": [ - "sha256:514f76d918fcc0b55c6680472f0a37970994e07bbb80725808= c17089be302068", - "sha256:c389c1d06bf7904078ca03399a4816f974a1d590090fecea0c= 63ec26ebaf1cef" + "sha256:74abc4e221d393ea5ce1f129ea6903209940c1ecd29e002e8c= 6933c2b21026e0", + "sha256:cbc619d09254895b0d12c2c691e237b2e91e9b2ecf5e84c26b= 35400f93dcfb83", + "sha256:cbfca99bd594a10f674d0cd97a3d802a1fdef635d4361e1a26= 58de47ed261e3a" ], - "markers": "python_version >=3D '2.7' and python_version not i= n '3.0, 3.1, 3.2, 3.3'", - "version": "=3D=3D2.7.0" + "version": "=3D=3D2.4.0" }, "pyflakes": { "hashes": [ - "sha256:7893783d01b8a89811dd72d7dfd4d84ff098e5eed95cfa8905= b22bbffe52efc3", - "sha256:f5bc8ecabc05bb9d291eb5203d6810b49040f6ff446a756326= 104746cc00c1db" + "sha256:9a7662ec724d0120012f6e29d6248ae3727d821bba522a0e6b= 356eff19126a49", + "sha256:f661252913bc1dbe7fcfcbf0af0db3f42ab65aabd1a6ca68fe= 5d466bace94dae" ], - "markers": "python_version >=3D '2.7' and python_version not i= n '3.0, 3.1, 3.2, 3.3'", - "version": "=3D=3D2.3.1" + "version": "=3D=3D2.0.0" }, "pylint": { "hashes": [ - "sha256:586d8fa9b1891f4b725f587ef267abe2a1bad89d6b184520c7= f07a253dd6e217", - "sha256:f7e2072654a6b6afdf5e2fb38147d3e2d2d43c89f648637baa= b63e026481279b" + "sha256:082a6d461b54f90eea49ca90fff4ee8b6e45e8029e5dbd72f6= 107ef84f3779c0", + "sha256:a01cd675eccf6e25b3bdb42be184eb46aaf89187d612ba0fb5= f93328ed6b0fd5" ], - "markers": "python_version ~=3D '3.6'", - "version": "=3D=3D2.8.2" + "index": "pypi", + "version": "=3D=3D2.8.0" }, "pyparsing": { "hashes": [ @@ -245,11 +238,11 @@ }, "tox": { "hashes": [ - "sha256:307a81ddb82bd463971a273f33e9533a24ed22185f27db8ce3= 386bff27d324e3", - "sha256:b0b5818049a1c1997599d42012a637a33f24c62ab8187223fd= d318fa8522637b" + "sha256:c60692d92fe759f46c610ac04c03cf0169432d1ff8e981e8ae= 63e068d0954fc3", + "sha256:f179cb4043d7dc1339425dd49ab1dd8c916246b0d9173143c1= b0af7498a03ab0" ], - "markers": "python_version >=3D '2.7' and python_version not i= n '3.0, 3.1, 3.2, 3.3, 3.4'", - "version": "=3D=3D3.23.1" + "index": "pypi", + "version": "=3D=3D3.18.0" }, "typed-ast": { "hashes": [ diff --git a/python/setup.cfg b/python/setup.cfg index 524789d6e0..e730f208d3 100644 --- a/python/setup.cfg +++ b/python/setup.cfg @@ -32,7 +32,9 @@ packages =3D * =3D py.typed =20 [options.extras_require] -# Run `pipenv lock --dev` when changing these requirements. +# For the devel group, When adding new dependencies or bumping the minimum +# version, use e.g. "pipenv install --dev pylint=3D=3D3.0.0". +# Subsequently, edit 'Pipfile' to remove e.g. 'pylint =3D "=3D=3D3.0.0'. devel =3D avocado-framework >=3D 87.0 flake8 >=3D 3.6.0 --=20 2.31.1 From nobody Sat May 18 23:55:12 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1625003361620804.6661277673248; Tue, 29 Jun 2021 14:49:21 -0700 (PDT) Received: from localhost ([::1]:40246 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyLbc-0003b4-BX for importer@patchew.org; Tue, 29 Jun 2021 17:49:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37692) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyLWB-0000MH-Pn for qemu-devel@nongnu.org; Tue, 29 Jun 2021 17:43:43 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:38126) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyLW9-0005iC-PL for qemu-devel@nongnu.org; Tue, 29 Jun 2021 17:43:43 -0400 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-255-rA5zi8LfOp-KAHKM6isYpw-1; Tue, 29 Jun 2021 17:43:39 -0400 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 BD80E1084F4B; Tue, 29 Jun 2021 21:43:38 +0000 (UTC) Received: from scv.redhat.com (ovpn-118-71.rdu2.redhat.com [10.10.118.71]) by smtp.corp.redhat.com (Postfix) with ESMTP id 41B6660C13; Tue, 29 Jun 2021 21:43:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625003021; 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=1UW2LFwdYE+RYCc43Fj2nlvRx60N4UVfxAjZVwF18E4=; b=gS+Zd0/dbAAfA0h4vLO734R8bU4lQbGx++5IQEyxGJW7uUhJHGteFb46rawUnCRTXGpnjU 2M/iArsGuVqAg2FuiyTwmvzhmpv6OnpjhZwmE+1WgUfK4TdLsHZVsVUgC/cueDLJ0urLWR k5DmjUgQauxuXVy4vsD+R/AgC9udzGU= X-MC-Unique: rA5zi8LfOp-KAHKM6isYpw-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v3 05/15] python: README.rst touchups Date: Tue, 29 Jun 2021 17:43:13 -0400 Message-Id: <20210629214323.1329806-6-jsnow@redhat.com> In-Reply-To: <20210629214323.1329806-1-jsnow@redhat.com> References: <20210629214323.1329806-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: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.435, 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: Thomas Huth , Eduardo Habkost , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Willian Rampazzo , Cleber Rosa , John Snow Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Clarifying a few points; removing the reference to 'setuptools' because it isn't referenced anywhere else in this document and doesn't really provide any useful information to a Python newcomer. Adjusting the language elsewhere to be less ambiguous and have fewer run-on sentences. Signed-off-by: John Snow Reviewed-by: Willian Rampazzo Reviewed-by: Wainer dos Santos Moschetta --- python/README.rst | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/python/README.rst b/python/README.rst index dcf993819d..107786ffdc 100644 --- a/python/README.rst +++ b/python/README.rst @@ -7,8 +7,7 @@ then by package (e.g. ``qemu/machine``, ``qemu/qmp``, etc). =20 ``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: +``setup.py``. You will generally invoke it by doing one of the following: =20 1. ``pip3 install .`` will install these packages to your current environment. If you are inside a virtual environment, they will @@ -17,12 +16,13 @@ it by doing one of the following: =20 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; you likely want the first invocation above. + this will fail; you want the first invocation above. =20 -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. +If you append the ``--editable`` or ``-e`` argument to either invocation +above, pip will install in "editable" mode. This installs the package as +a forwarder ("qemu.egg-link") that points to the source tree. In so +doing, the installed package always reflects the latest version in your +source tree. =20 Installing ".[devel]" instead of "." will additionally pull in required packages for testing this package. They are not runtime requirements, @@ -30,6 +30,7 @@ and are not needed to simply use these libraries. =20 Running ``make develop`` will pull in all testing dependencies and install QEMU in editable mode to the current environment. +(It is a shortcut for ``pip3 install -e .[devel]``.) =20 See `Installing packages using pip and virtual environments `_ @@ -39,7 +40,7 @@ for more information. Files in this directory ----------------------- =20 -- ``qemu/`` Python package source directory. +- ``qemu/`` Python 'qemu' namespace package source directory. - ``tests/`` Python package tests directory. - ``avocado.cfg`` Configuration for the Avocado test-runner. Used by ``make check`` et al. --=20 2.31.1 From nobody Sat May 18 23:55:12 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1625003363745909.8834262340997; Tue, 29 Jun 2021 14:49:23 -0700 (PDT) Received: from localhost ([::1]:40430 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyLbe-0003iM-Nk for importer@patchew.org; Tue, 29 Jun 2021 17:49:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37702) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyLWD-0000RL-0q for qemu-devel@nongnu.org; Tue, 29 Jun 2021 17:43:45 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:59641) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyLWB-0005jP-7K for qemu-devel@nongnu.org; Tue, 29 Jun 2021 17:43:44 -0400 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-45-RtObYYqTOEOM0vt-KxUxFQ-1; Tue, 29 Jun 2021 17:43:41 -0400 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 27C2F1F75B; Tue, 29 Jun 2021 21:43:40 +0000 (UTC) Received: from scv.redhat.com (ovpn-118-71.rdu2.redhat.com [10.10.118.71]) by smtp.corp.redhat.com (Postfix) with ESMTP id E2D9960C13; Tue, 29 Jun 2021 21:43:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625003022; 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=8ZrozozfvwqA4qmYRM/EhTMS4p+B+LAHgFGaFyE/YPM=; b=hZosZGifZo7d9VZB8uwfS5/y6tBPhNSo3HnWIHZ/H/JFc1sPHkkaigJLdXctp7+lHSBecA lDLX4D5MIN/FQ6J/0LC3YCDsNS4Tmu6zeFYR0JtvaC84T9DqkeRcmAAKeuiAYzdLAroHai BYvfCDdKSOi7Sr5OsuT8r0FVpEEuLPg= X-MC-Unique: RtObYYqTOEOM0vt-KxUxFQ-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v3 06/15] python: Add no-install usage instructions Date: Tue, 29 Jun 2021 17:43:14 -0400 Message-Id: <20210629214323.1329806-7-jsnow@redhat.com> In-Reply-To: <20210629214323.1329806-1-jsnow@redhat.com> References: <20210629214323.1329806-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: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.435, 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: Thomas Huth , Eduardo Habkost , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Willian Rampazzo , Cleber Rosa , John Snow Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" It's not encouraged, but it's legitimate to want to know how to do. Signed-off-by: John Snow Reviewed-by: Willian Rampazzo Reviewed-by: Wainer dos Santos Moschetta --- python/README.rst | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/python/README.rst b/python/README.rst index 107786ffdc..d4502fdb60 100644 --- a/python/README.rst +++ b/python/README.rst @@ -37,6 +37,34 @@ See `Installing packages using pip and virtual environme= nts for more information. =20 =20 +Using these packages without installing them +-------------------------------------------- + +These packages may be used without installing them first, by using one +of two tricks: + +1. Set your PYTHONPATH environment variable to include this source + directory, e.g. ``~/src/qemu/python``. See + https://docs.python.org/3/using/cmdline.html#envvar-PYTHONPATH + +2. Inside a Python script, use ``sys.path`` to forcibly include a search + path prior to importing the ``qemu`` namespace. See + https://docs.python.org/3/library/sys.html#sys.path + +A strong downside to both approaches is that they generally interfere +with static analysis tools being able to locate and analyze the code +being imported. + +Package installation also normally provides executable console scripts, +so that tools like ``qmp-shell`` are always available via $PATH. To +invoke them without installation, you can invoke e.g.: + +``> PYTHONPATH=3D~/src/qemu/python python3 -m qemu.qmp.qmp_shell`` + +The mappings between console script name and python module path can be +found in ``setup.cfg``. + + Files in this directory ----------------------- =20 --=20 2.31.1 From nobody Sat May 18 23:55:12 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1625003448063990.1482993683286; Tue, 29 Jun 2021 14:50:48 -0700 (PDT) Received: from localhost ([::1]:46762 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyLd0-000812-RH for importer@patchew.org; Tue, 29 Jun 2021 17:50:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37716) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyLWE-0000Vz-8A for qemu-devel@nongnu.org; Tue, 29 Jun 2021 17:43:46 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:31524) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyLWC-0005k8-EI for qemu-devel@nongnu.org; Tue, 29 Jun 2021 17:43:46 -0400 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-248-dGybewkeMWiZbgmcqysEUg-1; Tue, 29 Jun 2021 17:43:42 -0400 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 52072921DE2; Tue, 29 Jun 2021 21:43:41 +0000 (UTC) Received: from scv.redhat.com (ovpn-118-71.rdu2.redhat.com [10.10.118.71]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4E85060C13; Tue, 29 Jun 2021 21:43:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625003023; 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=83Ni4ceOLgyH8Mk2QxTTbQdfGXabSBlLRIhO+G07/TE=; b=gxfCTn2uzIAJ+RqOwOAt/iAylSFGc0SN+XZsq7hN9z/ZJz/mDSlWPm8Z/ZlIm7Qe5Bl5QA b0SkJ6zaWhDCxerCGqtKsOhWOhjeslG0LHGxVJcLVT91vBNLlPkOMQ2KJCtEsfQ31ZcXXB DmY1e6gzb4NYyF2hFPYH9/TaFrXBi00= X-MC-Unique: dGybewkeMWiZbgmcqysEUg-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v3 07/15] python: rename 'venv-check' target to 'check-pipenv' Date: Tue, 29 Jun 2021 17:43:15 -0400 Message-Id: <20210629214323.1329806-8-jsnow@redhat.com> In-Reply-To: <20210629214323.1329806-1-jsnow@redhat.com> References: <20210629214323.1329806-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=170.10.133.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.435, 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: Thomas Huth , Eduardo Habkost , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Willian Rampazzo , Cleber Rosa , John Snow Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Well, Cleber was right, this is a better name. In preparation for adding a different kind of virtual environment check (One that simply uses whichever version of Python you happen to have), rename this test 'check-pipenv' so that it matches the CI job 'check-python-pipenv'. Remove the "If you don't know which test to run" hint, because it's not actually likely you have Python 3.6 installed to be able to run the test. It's still the test I'd most prefer you to run, but it's not the test you are most likely to be able to run. Rename the 'venv' target to 'pipenv' as well, and move the more pertinent help text under the 'check-pipenv' target. Signed-off-by: John Snow Reviewed-by: Willian Rampazzo Reviewed-by: Wainer dos Santos Moschetta --- python/README.rst | 2 +- .gitlab-ci.d/static_checks.yml | 2 +- python/Makefile | 21 +++++++++++---------- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/python/README.rst b/python/README.rst index d4502fdb60..9c1fceaee7 100644 --- a/python/README.rst +++ b/python/README.rst @@ -79,7 +79,7 @@ Files in this directory - ``PACKAGE.rst`` is used as the README file that is visible on PyPI.org. - ``Pipfile`` is used by Pipenv to generate ``Pipfile.lock``. - ``Pipfile.lock`` is a set of pinned package dependencies that this packa= ge - is tested under in our CI suite. It is used by ``make venv-check``. + is tested under in our CI suite. It is used by ``make check-pipenv``. - ``README.rst`` you are here! - ``VERSION`` contains the PEP-440 compliant version used to describe this package; it is referenced by ``setup.cfg``. diff --git a/.gitlab-ci.d/static_checks.yml b/.gitlab-ci.d/static_checks.yml index c5fa4fce26..b01f6ec231 100644 --- a/.gitlab-ci.d/static_checks.yml +++ b/.gitlab-ci.d/static_checks.yml @@ -30,7 +30,7 @@ check-python-pipenv: stage: test image: $CI_REGISTRY_IMAGE/qemu/python:latest script: - - make -C python venv-check + - make -C python check-pipenv variables: GIT_DEPTH: 1 needs: diff --git a/python/Makefile b/python/Makefile index b5621b0d54..07ad73ccd0 100644 --- a/python/Makefile +++ b/python/Makefile @@ -1,15 +1,13 @@ -.PHONY: help venv venv-check check clean distclean develop +.PHONY: help pipenv check-pipenv check clean distclean develop =20 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 "make check-pipenv:" + @echo " Run tests in pipenv's virtual environment." + @echo " These tests use the oldest dependencies." + @echo " Requires: Python 3.6 and pipenv." + @echo " Hint (Fedora): 'sudo dnf install python3.6 pipenv'" @echo "" @echo "make develop: Install deps for 'make check', and" @echo " the qemu libs in editable/development mode." @@ -18,18 +16,21 @@ help: @echo "" @echo "make check-tox: run linters using multiple python versions." @echo "" + @echo "make pipenv" + @echo " Creates pipenv's virtual environment (.venv)" + @echo "" @echo "make clean: remove package build output." @echo "" @echo "make distclean: remove venv files, qemu package forwarder," @echo " built distribution files, and everything" @echo " from 'make clean'." =20 -venv: .venv +pipenv: .venv .venv: Pipfile.lock @PIPENV_VENV_IN_PROJECT=3D1 pipenv sync --dev --keep-outdated @touch .venv =20 -venv-check: venv +check-pipenv: pipenv @pipenv run make check =20 develop: --=20 2.31.1 From nobody Sat May 18 23:55:12 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1625003248043155.28426010592852; Tue, 29 Jun 2021 14:47:28 -0700 (PDT) Received: from localhost ([::1]:34296 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyLZl-00082d-W1 for importer@patchew.org; Tue, 29 Jun 2021 17:47:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37724) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyLWF-0000aU-CH for qemu-devel@nongnu.org; Tue, 29 Jun 2021 17:43:47 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:40351) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyLWD-0005ks-ND for qemu-devel@nongnu.org; Tue, 29 Jun 2021 17:43:47 -0400 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-233-FvPZ0SkUMReVo_EpQrUKyg-1; Tue, 29 Jun 2021 17:43:43 -0400 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 836E41835AC3; Tue, 29 Jun 2021 21:43:42 +0000 (UTC) Received: from scv.redhat.com (ovpn-118-71.rdu2.redhat.com [10.10.118.71]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7C17460C13; Tue, 29 Jun 2021 21:43:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625003025; 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=rHRP2gyKEwESVeOhqwg7AAp/7e7agO3dvi3DmqaJZPc=; b=WyCiqwq6GhwZV3MaNkQ+NHr2lRg+CoAw4+7FNQKjuxH+ZYkZzEBQpSrh+0kz6pBl42VfTm hUIo+Lfq6xdaX3k/zrHSWQW3AITVKovurmOx7wR6nQSLJiI5SL1+R1MvX1nPwUNrl8gXtI taVsx8J2vlnW20LK9/WOVgTcvJceXJk= X-MC-Unique: FvPZ0SkUMReVo_EpQrUKyg-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v3 08/15] python: update help text for check-tox Date: Tue, 29 Jun 2021 17:43:16 -0400 Message-Id: <20210629214323.1329806-9-jsnow@redhat.com> In-Reply-To: <20210629214323.1329806-1-jsnow@redhat.com> References: <20210629214323.1329806-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: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.435, 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: Thomas Huth , Eduardo Habkost , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Willian Rampazzo , Cleber Rosa , John Snow Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Move it up near the check-pipenv help text, and update it to suggest parity. (At the time I first added it, I wasn't sure if I would be keeping it, but I've come to appreciate it as it has actually helped uncover bugs I would not have noticed without it. It should stay.) Signed-off-by: John Snow Reviewed-by: Willian Rampazzo Reviewed-by: Wainer dos Santos Moschetta --- python/Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/python/Makefile b/python/Makefile index 07ad73ccd0..d2cfa6ad8f 100644 --- a/python/Makefile +++ b/python/Makefile @@ -9,13 +9,17 @@ help: @echo " Requires: Python 3.6 and pipenv." @echo " Hint (Fedora): 'sudo dnf install python3.6 pipenv'" @echo "" + @echo "make check-tox:" + @echo " Run tests against multiple python versions." + @echo " These tests use the newest dependencies." + @echo " Requires: Python 3.6 - 3.10, and tox." + @echo " Hint (Fedora): 'sudo dnf install python3-tox python3.10'" + @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 "" - @echo "make check-tox: run linters using multiple python versions." - @echo "" @echo "make pipenv" @echo " Creates pipenv's virtual environment (.venv)" @echo "" --=20 2.31.1 From nobody Sat May 18 23:55:12 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1625003449085753.830502312717; Tue, 29 Jun 2021 14:50:49 -0700 (PDT) Received: from localhost ([::1]:46960 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyLd2-000899-1M for importer@patchew.org; Tue, 29 Jun 2021 17:50:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37736) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyLWJ-0000qh-R7 for qemu-devel@nongnu.org; Tue, 29 Jun 2021 17:43:51 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:27049) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyLWI-0005nP-3C for qemu-devel@nongnu.org; Tue, 29 Jun 2021 17:43:51 -0400 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-313--fUt9Ur6Orawy_ysMzdQ2Q-1; Tue, 29 Jun 2021 17:43:48 -0400 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 0AFD61084F4B; Tue, 29 Jun 2021 21:43:47 +0000 (UTC) Received: from scv.redhat.com (ovpn-118-71.rdu2.redhat.com [10.10.118.71]) by smtp.corp.redhat.com (Postfix) with ESMTP id AC01D60C13; Tue, 29 Jun 2021 21:43:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625003029; 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=ORzOm4Q1hLofCsi2sSRs98c55SG0/AvUzqqAc6Q335E=; b=VWAOjMMmeKWF8ga/DQJzRv2ZAtSbfUi0khTNX0MlxRXCQQStdJPn/nPkGT87Go7PlT4Gzo i7XY96kehPfHfeKrBatLMWfiSRrdu8h+l+Cg9mVDHEA53DueJ8cdZy/2D/Q9d+YrZlVHk0 4jDc0+bRpuAOjyhJ+UOolzgzquyZYDk= X-MC-Unique: -fUt9Ur6Orawy_ysMzdQ2Q-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v3 09/15] python: Fix .PHONY Make specifiers Date: Tue, 29 Jun 2021 17:43:17 -0400 Message-Id: <20210629214323.1329806-10-jsnow@redhat.com> In-Reply-To: <20210629214323.1329806-1-jsnow@redhat.com> References: <20210629214323.1329806-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: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.435, 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: Thomas Huth , Eduardo Habkost , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Willian Rampazzo , Cleber Rosa , John Snow Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" I missed the 'check-tox' target. Add that, but split the large .PHONY specifier at the top into its component pieces and move them near the targets they describe so that they're much harder to forget to update. Signed-off-by: John Snow Reviewed-by: Wainer dos Santos Moschetta Reviewed-by: Willian Rampazzo --- python/Makefile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/python/Makefile b/python/Makefile index d2cfa6ad8f..d34c4e35d9 100644 --- a/python/Makefile +++ b/python/Makefile @@ -1,5 +1,4 @@ -.PHONY: help pipenv check-pipenv check clean distclean develop - +.PHONY: help help: @echo "python packaging help:" @echo "" @@ -29,25 +28,32 @@ help: @echo " built distribution files, and everything" @echo " from 'make clean'." =20 +.PHONY: pipenv pipenv: .venv .venv: Pipfile.lock @PIPENV_VENV_IN_PROJECT=3D1 pipenv sync --dev --keep-outdated @touch .venv =20 +.PHONY: check-pipenv check-pipenv: pipenv @pipenv run make check =20 +.PHONY: develop develop: pip3 install -e .[devel] =20 +.PHONY: check check: @avocado --config avocado.cfg run tests/ =20 +.PHONY: check-tox check-tox: @tox =20 +.PHONY: clean clean: python3 setup.py clean --all =20 +.PHONY: distclean distclean: clean rm -rf qemu.egg-info/ .venv/ .tox/ dist/ --=20 2.31.1 From nobody Sat May 18 23:55:12 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1625003593668179.52946288960595; Tue, 29 Jun 2021 14:53:13 -0700 (PDT) Received: from localhost ([::1]:55372 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyLfM-0005iI-Ic for importer@patchew.org; Tue, 29 Jun 2021 17:53:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37846) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyLWR-0001AG-H1 for qemu-devel@nongnu.org; Tue, 29 Jun 2021 17:44:00 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:45515) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyLWP-0005tg-Bb for qemu-devel@nongnu.org; Tue, 29 Jun 2021 17:43:59 -0400 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-603-dlEsiFCYM6qLsqUYfLhftA-1; Tue, 29 Jun 2021 17:43:55 -0400 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 8A09C100C609; Tue, 29 Jun 2021 21:43:54 +0000 (UTC) Received: from scv.redhat.com (ovpn-118-71.rdu2.redhat.com [10.10.118.71]) by smtp.corp.redhat.com (Postfix) with ESMTP id 322E260C13; Tue, 29 Jun 2021 21:43:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625003036; 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=t8ZW58GEiHdT5FNdRjpS7u6KaFHPOeri+1N1N5SuD5Q=; b=OIJKMPYPfNrRj/0f8ZsUE9n3vuSfSes8dmem3WdtcZDZv4PW80zapJy0M7bMBCoa6x5+T6 1fDJ2TYciTcdhQIjtoydVDPHYlVt3VI1oaAIuq2d2CG8Wpi+FHleBta5j25lhjvmtw3FU4 Wc7ynpmq74AahkbrtYigInuoM7xcSnI= X-MC-Unique: dlEsiFCYM6qLsqUYfLhftA-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v3 10/15] python: only check qemu/ subdir with flake8 Date: Tue, 29 Jun 2021 17:43:18 -0400 Message-Id: <20210629214323.1329806-11-jsnow@redhat.com> In-Reply-To: <20210629214323.1329806-1-jsnow@redhat.com> References: <20210629214323.1329806-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: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.435, 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: Thomas Huth , Eduardo Habkost , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Willian Rampazzo , Cleber Rosa , John Snow Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" flake8 is a little eager to check everything it can. Limit it to checking inside the qemu namespace directory only. Update setup.cfg now that the exclude patterns are no longer necessary. Signed-off-by: John Snow Reviewed-by: Wainer dos Santos Moschetta Reviewed-by: Willian Rampazzo Tested-by: Wainer dos Santos Moschetta --- python/setup.cfg | 2 -- python/tests/flake8.sh | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/python/setup.cfg b/python/setup.cfg index e730f208d3..11f71d5312 100644 --- a/python/setup.cfg +++ b/python/setup.cfg @@ -62,8 +62,6 @@ console_scripts =3D [flake8] extend-ignore =3D E722 # Prefer pylint's bare-except checks to flake8's exclude =3D __pycache__, - .venv, - .tox, =20 [mypy] strict =3D True diff --git a/python/tests/flake8.sh b/python/tests/flake8.sh index 51e0788462..1cd7d40fad 100755 --- a/python/tests/flake8.sh +++ b/python/tests/flake8.sh @@ -1,2 +1,2 @@ #!/bin/sh -e -python3 -m flake8 +python3 -m flake8 qemu/ --=20 2.31.1 From nobody Sat May 18 23:55:12 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1625003708969903.2130116691648; Tue, 29 Jun 2021 14:55:08 -0700 (PDT) Received: from localhost ([::1]:59724 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyLhD-0000JT-W7 for importer@patchew.org; Tue, 29 Jun 2021 17:55:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37866) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyLWV-0001Bt-SI for qemu-devel@nongnu.org; Tue, 29 Jun 2021 17:44:04 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:45821) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyLWR-0005ua-7P for qemu-devel@nongnu.org; Tue, 29 Jun 2021 17:44:02 -0400 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-89-i7zWp2u6NKu_vdkSQDtFbA-1; Tue, 29 Jun 2021 17:43:56 -0400 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 B24E7343CF; Tue, 29 Jun 2021 21:43:55 +0000 (UTC) Received: from scv.redhat.com (ovpn-118-71.rdu2.redhat.com [10.10.118.71]) by smtp.corp.redhat.com (Postfix) with ESMTP id B2DC460C13; Tue, 29 Jun 2021 21:43:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625003038; 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=aSnVjssN9hhZDxOZoZJVWS8SyrnuMV9LR95vpjh5sBM=; b=ApiT6jO+ja+ia9+GHgYJV5oNQL468mfwHrZE8fbuWOAV8d0kM4DffSak1tcCSyNLN+WBAG kXUWnY6EDEE2NqbtMHTQKzk87gxtAnZEFOTB0Ljatn3bYEoH+4wJebkD8/HA25rzQzJh04 s2dbVTFcLfzvGzQdKVA6H85edKsQuEc= X-MC-Unique: i7zWp2u6NKu_vdkSQDtFbA-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v3 11/15] python: add 'make check-dev' invocation Date: Tue, 29 Jun 2021 17:43:19 -0400 Message-Id: <20210629214323.1329806-12-jsnow@redhat.com> In-Reply-To: <20210629214323.1329806-1-jsnow@redhat.com> References: <20210629214323.1329806-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: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.435, 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: Thomas Huth , Eduardo Habkost , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Willian Rampazzo , Cleber Rosa , John Snow Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" This is a *third* way to run the Python tests. Unlike the first two (check-pipenv, check-tox), this version does not require any specific interpreter version -- making it a lot easier to tell people to run it as a quick smoketest prior to submission to GitLab CI. Summary: Checked via GitLab CI: - check-pipenv: tests our oldest python & dependencies - check-tox: tests newest dependencies on all non-EOL python versions Executed only incidentally: - check-dev: tests newest dependencies on whichever python version ('make check' does not set up any environment at all, it just runs the tests in your current environment. All four invocations perform the exact same tests, just in different execution environments.) Signed-off-by: John Snow Acked-by: Wainer dos Santos Moschetta Acked-by: Willian Rampazzo Reviewed-by: Wainer dos Santos Moschetta Reviewed-by: Willian Rampazzo Tested-by: Wainer dos Santos Moschetta --- python/Makefile | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/python/Makefile b/python/Makefile index d34c4e35d9..8f8e1999c0 100644 --- a/python/Makefile +++ b/python/Makefile @@ -1,3 +1,5 @@ +QEMU_VENV_DIR=3D.dev-venv + .PHONY: help help: @echo "python packaging help:" @@ -14,6 +16,11 @@ help: @echo " Requires: Python 3.6 - 3.10, and tox." @echo " Hint (Fedora): 'sudo dnf install python3-tox python3.10'" @echo "" + @echo "make check-dev:" + @echo " Run tests in a venv against your default python3 version." + @echo " These tests use the newest dependencies." + @echo " Requires: Python 3.x" + @echo "" @echo "make develop: Install deps for 'make check', and" @echo " the qemu libs in editable/development mode." @echo "" @@ -22,6 +29,9 @@ help: @echo "make pipenv" @echo " Creates pipenv's virtual environment (.venv)" @echo "" + @echo "make dev-venv" + @echo " Creates a simple venv for check-dev. ($(QEMU_VENV_DIR))" + @echo "" @echo "make clean: remove package build output." @echo "" @echo "make distclean: remove venv files, qemu package forwarder," @@ -38,9 +48,30 @@ pipenv: .venv check-pipenv: pipenv @pipenv run make check =20 +.PHONY: dev-venv +dev-venv: $(QEMU_VENV_DIR) $(QEMU_VENV_DIR)/bin/activate +$(QEMU_VENV_DIR) $(QEMU_VENV_DIR)/bin/activate: setup.cfg + @echo "VENV $(QEMU_VENV_DIR)" + @python3 -m venv $(QEMU_VENV_DIR) + @( \ + echo "ACTIVATE $(QEMU_VENV_DIR)"; \ + . $(QEMU_VENV_DIR)/bin/activate; \ + echo "INSTALL qemu[devel] $(QEMU_VENV_DIR)"; \ + make develop 1>/dev/null; \ + ) + @touch $(QEMU_VENV_DIR) + +.PHONY: check-dev +check-dev: dev-venv + @( \ + echo "ACTIVATE $(QEMU_VENV_DIR)"; \ + . $(QEMU_VENV_DIR)/bin/activate; \ + make check; \ + ) + .PHONY: develop develop: - pip3 install -e .[devel] + pip3 install --disable-pip-version-check -e .[devel] =20 .PHONY: check check: @@ -56,4 +87,4 @@ clean: =20 .PHONY: distclean distclean: clean - rm -rf qemu.egg-info/ .venv/ .tox/ dist/ + rm -rf qemu.egg-info/ .venv/ .tox/ $(QEMU_VENV_DIR) dist/ --=20 2.31.1 From nobody Sat May 18 23:55:12 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1625003368964509.327404872624; Tue, 29 Jun 2021 14:49:28 -0700 (PDT) Received: from localhost ([::1]:40862 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyLbi-0003zf-Ts for importer@patchew.org; Tue, 29 Jun 2021 17:49:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37876) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyLWX-0001Dq-8l for qemu-devel@nongnu.org; Tue, 29 Jun 2021 17:44:06 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:37950) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyLWR-0005uh-Cz for qemu-devel@nongnu.org; Tue, 29 Jun 2021 17:44:04 -0400 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-388-KQH-hXD5MQ-Pxx5NkUs4rg-1; Tue, 29 Jun 2021 17:43:57 -0400 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 D96CB1835AC2; Tue, 29 Jun 2021 21:43:56 +0000 (UTC) Received: from scv.redhat.com (ovpn-118-71.rdu2.redhat.com [10.10.118.71]) by smtp.corp.redhat.com (Postfix) with ESMTP id D8BA060C13; Tue, 29 Jun 2021 21:43:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625003038; 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=4ca9iKz45sUko8niMbBQYKNRFNGsoAOpVoH3FqjAQRo=; b=iW4r12futqFq8KJZAY+nD5nsaleu2ieR4rcarnzXg+7jNwVQUYYqQnBpheGRGcvHvTgnYN Qx9ATk2efZ/8WG8qqaUY8zqvokMOOZRPTSyoJVics7pI/nu+HYS46dVV+4/2Lo9SOHNf24 hnOMmB1CL4boy6NtoSXGmJAUWC/07GU= X-MC-Unique: KQH-hXD5MQ-Pxx5NkUs4rg-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v3 12/15] python: Update help text on 'make check', 'make develop' Date: Tue, 29 Jun 2021 17:43:20 -0400 Message-Id: <20210629214323.1329806-13-jsnow@redhat.com> In-Reply-To: <20210629214323.1329806-1-jsnow@redhat.com> References: <20210629214323.1329806-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=170.10.133.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.435, 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: Thomas Huth , Eduardo Habkost , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Willian Rampazzo , Cleber Rosa , John Snow Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Update for visual parity with the other targets. Signed-off-by: John Snow Reviewed-by: Willian Rampazzo Reviewed-by: Wainer dos Santos Moschetta --- python/Makefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/python/Makefile b/python/Makefile index 8f8e1999c0..a14705d12e 100644 --- a/python/Makefile +++ b/python/Makefile @@ -21,10 +21,14 @@ help: @echo " These tests use the newest dependencies." @echo " Requires: Python 3.x" @echo "" - @echo "make develop: Install deps for 'make check', and" - @echo " the qemu libs in editable/development mode." + @echo "make check:" + @echo " Run tests in your *current environment*." + @echo " Performs no environment setup of any kind." @echo "" - @echo "make check: run linters using the current environment." + @echo "make develop:" + @echo " Install deps needed for for 'make check'," + @echo " and install the qemu package in editable mode." + @echo " (Can be used in or outside of a venv.)" @echo "" @echo "make pipenv" @echo " Creates pipenv's virtual environment (.venv)" --=20 2.31.1 From nobody Sat May 18 23:55:12 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1625003566684272.8529477649521; Tue, 29 Jun 2021 14:52:46 -0700 (PDT) Received: from localhost ([::1]:53950 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyLev-0004ha-FW for importer@patchew.org; Tue, 29 Jun 2021 17:52:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37898) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyLWb-0001Gf-2t for qemu-devel@nongnu.org; Tue, 29 Jun 2021 17:44:09 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:49524) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyLWW-0005vb-8A for qemu-devel@nongnu.org; Tue, 29 Jun 2021 17:44:08 -0400 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-435-LHf0xvGmPsGdQnM-Z6WmxA-1; Tue, 29 Jun 2021 17:43:59 -0400 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 0D0AB1835AC4; Tue, 29 Jun 2021 21:43:58 +0000 (UTC) Received: from scv.redhat.com (ovpn-118-71.rdu2.redhat.com [10.10.118.71]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0C1A060C17; Tue, 29 Jun 2021 21:43:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625003042; 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=92qzPqyeZxwtA40V6eCHlM+udM+TZ2EGgvF59F9Jk2c=; b=RESlND9NLXaJGI9Zd2cEXM8AO/f4IKUYMlLUMHfUXV3oPlUZP+bOhz3TQlCEgcFBAUbxwT uco3SMWJqlpGnp0r/CgFplFS3TU6IZDJePCmmOlU+iONuC5SAKJ69oVvo7BooZkvhSpuMZ DwUsfe17G8tagW3SgAaKANSntD1bBaQ= X-MC-Unique: LHf0xvGmPsGdQnM-Z6WmxA-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v3 13/15] python: Update help text on 'make clean', 'make distclean' Date: Tue, 29 Jun 2021 17:43:21 -0400 Message-Id: <20210629214323.1329806-14-jsnow@redhat.com> In-Reply-To: <20210629214323.1329806-1-jsnow@redhat.com> References: <20210629214323.1329806-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: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.435, 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: Thomas Huth , Eduardo Habkost , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Willian Rampazzo , Cleber Rosa , John Snow Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Update for visual parity with all the remaining targets. Signed-off-by: John Snow Reviewed-by: Willian Rampazzo Reviewed-by: Wainer dos Santos Moschetta --- python/Makefile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/python/Makefile b/python/Makefile index a14705d12e..0432ee0022 100644 --- a/python/Makefile +++ b/python/Makefile @@ -36,11 +36,14 @@ help: @echo "make dev-venv" @echo " Creates a simple venv for check-dev. ($(QEMU_VENV_DIR))" @echo "" - @echo "make clean: remove package build output." + @echo "make clean:" + @echo " Remove package build output." @echo "" - @echo "make distclean: remove venv files, qemu package forwarder," - @echo " built distribution files, and everything" - @echo " from 'make clean'." + @echo "make distclean:" + @echo " remove pipenv/venv files, qemu package forwarder," + @echo " built distribution files, and everything from 'make clean'." + @echo "" + @echo -e "Have a nice day ^_^\n" =20 .PHONY: pipenv pipenv: .venv --=20 2.31.1 From nobody Sat May 18 23:55:12 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1625003457336255.68501431139032; Tue, 29 Jun 2021 14:50:57 -0700 (PDT) Received: from localhost ([::1]:47348 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyLd9-0008On-6i for importer@patchew.org; Tue, 29 Jun 2021 17:50:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37910) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyLWc-0001Ib-Tt for qemu-devel@nongnu.org; Tue, 29 Jun 2021 17:44:11 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:32320) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyLWX-0005vm-5Y for qemu-devel@nongnu.org; Tue, 29 Jun 2021 17:44:10 -0400 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-234-bm8Gyjs5PiGML0YNPpAkBA-1; Tue, 29 Jun 2021 17:44:00 -0400 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 3F7D0800D62; Tue, 29 Jun 2021 21:43:59 +0000 (UTC) Received: from scv.redhat.com (ovpn-118-71.rdu2.redhat.com [10.10.118.71]) by smtp.corp.redhat.com (Postfix) with ESMTP id 36F8B60C17; Tue, 29 Jun 2021 21:43:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625003043; 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=FIlivrLGNMbVG/2WStx0ppkgjG0uEEKoHDMxcZntcM4=; b=QIUqlKb8+78HEhPLK0eip3Ui5Yf6+DyomsvtbHzmoeSUT2QmI4gqcGPu+nYMPrMBe1OP3M XC6zftlGDh5N/OE0GNEqc9pAAfo3A+ZEXKxJE7FFP3gC9CFFTyfqRa0o2uEKcyhdbnwQ9M LWOqCffo6mBiLCXHTTob//7J1Un0tGY= X-MC-Unique: bm8Gyjs5PiGML0YNPpAkBA-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v3 14/15] python: remove auto-generated pyproject.toml file Date: Tue, 29 Jun 2021 17:43:22 -0400 Message-Id: <20210629214323.1329806-15-jsnow@redhat.com> In-Reply-To: <20210629214323.1329806-1-jsnow@redhat.com> References: <20210629214323.1329806-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=170.10.133.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.435, 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: Thomas Huth , Eduardo Habkost , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Willian Rampazzo , Cleber Rosa , John Snow Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" For reasons that at-present escape me, pipenv insists on creating a stub pyproject.toml file. This file is a nuisance, because its mere presence changes the behavior of various tools. For instance, this stub file will cause "pip install --user -e ." to fail in spectacular fashion with misleading errors. "pip install -e ." works okay, but for some reason pip does not support editable installs to the user directory when using PEP517. References: https://github.com/pypa/pip/pull/9990 https://github.com/pypa/pip/issues/7953 As outlined in ea1213b7ccc, it is still too early for us to consider moving to a PEP-517 exclusive package. We must support older distributions, so squash the annoyance for now. (Python 3.6 shipped Dec 2016, PEP517 support showed up in pip sometime in 2019 or so.) Add 'pyproject.toml' to the 'make clean' target, and also delete it after every pipenv invocation issued by the Makefile. Signed-off-by: John Snow Reviewed-by: Willian Rampazzo Reviewed-by: Wainer dos Santos Moschetta --- python/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/Makefile b/python/Makefile index 0432ee0022..ac46ae33e7 100644 --- a/python/Makefile +++ b/python/Makefile @@ -49,6 +49,7 @@ help: pipenv: .venv .venv: Pipfile.lock @PIPENV_VENV_IN_PROJECT=3D1 pipenv sync --dev --keep-outdated + rm -f pyproject.toml @touch .venv =20 .PHONY: check-pipenv @@ -91,6 +92,7 @@ check-tox: .PHONY: clean clean: python3 setup.py clean --all + rm -f pyproject.toml =20 .PHONY: distclean distclean: clean --=20 2.31.1 From nobody Sat May 18 23:55:12 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1625003681821615.4700295791662; Tue, 29 Jun 2021 14:54:41 -0700 (PDT) Received: from localhost ([::1]:58364 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyLgm-0007p2-I4 for importer@patchew.org; Tue, 29 Jun 2021 17:54:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37920) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyLWe-0001Q2-Mb for qemu-devel@nongnu.org; Tue, 29 Jun 2021 17:44:12 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:51695) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyLWc-0005yF-Kk for qemu-devel@nongnu.org; Tue, 29 Jun 2021 17:44:12 -0400 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-411-b5dbqEA3N1Cu9CwQgBpw9w-1; Tue, 29 Jun 2021 17:44:04 -0400 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 9D54B802C80; Tue, 29 Jun 2021 21:44:03 +0000 (UTC) Received: from scv.redhat.com (ovpn-118-71.rdu2.redhat.com [10.10.118.71]) by smtp.corp.redhat.com (Postfix) with ESMTP id 67AF360C17; Tue, 29 Jun 2021 21:43:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625003048; 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=NwICdIoa1JkGpX02dWXq3XJLphb5g3g4+wwIq2O6pso=; b=BkQRvegQY66TwdQDAFVvFn4wbb5pzJMwelYNLq0sI4T6U6CS7M/OXXDt146HlsEjB2vcgY 9vXdiq1rnEfEdZAFOxToqLQNkVcflsQxX93HVUhe4V4bS0mKp0GhReEFMcymjxshhjvjfN LCFo9NRBUGPW1y6G8xusRtTCLp3jw38= X-MC-Unique: b5dbqEA3N1Cu9CwQgBpw9w-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v3 15/15] python: Fix broken ReST docstrings Date: Tue, 29 Jun 2021 17:43:23 -0400 Message-Id: <20210629214323.1329806-16-jsnow@redhat.com> In-Reply-To: <20210629214323.1329806-1-jsnow@redhat.com> References: <20210629214323.1329806-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: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.435, 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: Thomas Huth , Eduardo Habkost , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Willian Rampazzo , Cleber Rosa , John Snow Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" This patch *doesn't* update all of the docstring standards across the QEMU package directory to make our docstring usage consistent. It *doesn't* fix the formatting to make it look pretty or reasonable in generated output. It *does* fix a few small instances where Sphinx would emit a build warning because of malformed ReST -- If we built our Python docs with Sphinx. Signed-off-by: John Snow Reviewed-by: Wainer dos Santos Moschetta Reviewed-by: Willian Rampazzo --- You'll have to take my word for it for now, or, to test that (ugly though it may be) a theoretical Sphinx build would produce no build errors: > cd ~/src/qemu/python > sphinx-apidoc --separate --private --no-toc --module-first \ --implicit-namespaces --full --ext-intersphinx --ext-coverage \ --ext-viewcode qemu/ -o docs/ > sed -i '1s|^|import os; import sys; sys.path.insert(0, os.path.abspath(".= ./"))\n|' docs/conf.py > make -C docs html > rm -rf docs/ I am preparing to add Sphinx, but need to fix these annoyances first so that regressions are easy to spot as fixes are applied across the tree. I plan to use my forthcoming Asynchronous QMP series as a test pilot for documenting our docstring standards. Assuming it goes well, I will update the docstrings elsewhere in this package at that time. Signed-off-by: John Snow --- python/qemu/machine/__init__.py | 6 +++--- python/qemu/machine/machine.py | 3 ++- python/qemu/qmp/__init__.py | 1 + python/qemu/qmp/qom_common.py | 2 +- python/qemu/utils/accel.py | 2 +- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/python/qemu/machine/__init__.py b/python/qemu/machine/__init__= .py index 728f27adbe..9ccd58ef14 100644 --- a/python/qemu/machine/__init__.py +++ b/python/qemu/machine/__init__.py @@ -4,10 +4,10 @@ This library provides a few high-level classes for driving QEMU from a test suite, not intended for production use. =20 -- QEMUMachine: Configure and Boot a QEMU VM - - QEMUQtestMachine: VM class, with a qtest socket. + | QEMUQtestProtocol: send/receive qtest messages. + | QEMUMachine: Configure and Boot a QEMU VM + | +-- QEMUQtestMachine: VM class, with a qtest socket. =20 -- QEMUQtestProtocol: Connect to, send/receive qtest messages. """ =20 # Copyright (C) 2020-2021 John Snow for Red Hat Inc. diff --git a/python/qemu/machine/machine.py b/python/qemu/machine/machine.py index e3345dfa1b..d47ab3d896 100644 --- a/python/qemu/machine/machine.py +++ b/python/qemu/machine/machine.py @@ -545,7 +545,8 @@ def set_qmp_monitor(self, enabled: bool =3D True) -> No= ne: @param enabled: if False, qmp monitor options will be removed from the base arguments of the resulting QEMU command line. Default is True. - @note: call this function before launch(). + + .. note:: Call this function before launch(). """ self._qmp_set =3D enabled =20 diff --git a/python/qemu/qmp/__init__.py b/python/qemu/qmp/__init__.py index 376954cb6d..269516a79b 100644 --- a/python/qemu/qmp/__init__.py +++ b/python/qemu/qmp/__init__.py @@ -279,6 +279,7 @@ def accept(self, timeout: Optional[float] =3D 15.0) -> = QMPMessage: None). The value passed will set the behavior of t= he underneath QMP socket as described in [1]. Default value is set to 15.0. + @return QMP greeting dict @raise OSError on socket connection errors @raise QMPConnectError if the greeting is not received diff --git a/python/qemu/qmp/qom_common.py b/python/qemu/qmp/qom_common.py index f82b16772d..a59ae1a2a1 100644 --- a/python/qemu/qmp/qom_common.py +++ b/python/qemu/qmp/qom_common.py @@ -156,7 +156,7 @@ def command_runner( """ Run a fully-parsed subcommand, with error-handling for the CLI. =20 - :return: The return code from `.run()`. + :return: The return code from `run()`. """ try: cmd =3D cls(args) diff --git a/python/qemu/utils/accel.py b/python/qemu/utils/accel.py index 297933df2a..386ff640ca 100644 --- a/python/qemu/utils/accel.py +++ b/python/qemu/utils/accel.py @@ -36,7 +36,7 @@ def list_accel(qemu_bin: str) -> List[str]: List accelerators enabled in the QEMU binary. =20 @param qemu_bin (str): path to the QEMU binary. - @raise Exception: if failed to run `qemu -accel help` + @raise Exception: if failed to run ``qemu -accel help`` @return a list of accelerator names. """ if not qemu_bin: --=20 2.31.1