From patchwork Tue Oct 20 19:35:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Snow X-Patchwork-Id: 1385203 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=GkbJGqm8; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CG3qk6MnCz9sSC for ; Wed, 21 Oct 2020 06:40:02 +1100 (AEDT) Received: from localhost ([::1]:53340 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kUxUG-0001cr-QY for incoming@patchwork.ozlabs.org; Tue, 20 Oct 2020 15:40:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42630) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUxQg-00066E-FG for qemu-devel@nongnu.org; Tue, 20 Oct 2020 15:36:18 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:35596) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kUxQW-0000xh-W9 for qemu-devel@nongnu.org; Tue, 20 Oct 2020 15:36:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603222567; 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=Hq0h35liFZEwbQ62xiQF3KWddmk4JqYuoVH3VpCfoLE=; b=GkbJGqm8ywNCplum0d1Xg4i3GaPTjTcd2y2crIVNni4TGCW20K8LdHoUFppR9ITHSGvzIt Sf5YzwKYRaP6d5fenCrDcGDNXQiORs1tmc5XaFwofzYiw0xvOxm8f+CDZLpdLUbvt8pbZb x21fxfO4tHEoBbN6jsMXUVNcMZCbjLs= 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-438-dbCYXx5iNLmB68NCDKEiaQ-1; Tue, 20 Oct 2020 15:36:05 -0400 X-MC-Unique: dbCYXx5iNLmB68NCDKEiaQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 210CF1006C8E; Tue, 20 Oct 2020 19:36:04 +0000 (UTC) Received: from scv.redhat.com (ovpn-115-172.rdu2.redhat.com [10.10.115.172]) by smtp.corp.redhat.com (Postfix) with ESMTP id C0B1A5C1C7; Tue, 20 Oct 2020 19:36:01 +0000 (UTC) From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v3 01/15] python: create qemu packages Date: Tue, 20 Oct 2020 15:35:41 -0400 Message-Id: <20201020193555.1493936-2-jsnow@redhat.com> In-Reply-To: <20201020193555.1493936-1-jsnow@redhat.com> References: <20201020193555.1493936-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 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 Received-SPF: pass client-ip=63.128.21.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/20 01:15:43 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=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: Kevin Wolf , Fam Zheng , Ben Widawsky , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Eduardo Habkost , qemu-block@nongnu.org, =?utf-8?q?Ale?= =?utf-8?q?x_Benn=C3=A9e?= , =?utf-8?q?Philippe_Math?= =?utf-8?q?ieu-Daud=C3=A9?= , Andrea Bolognani , Wainer dos Santos Moschetta , Max Reitz , Rohit Shinde , Willian Rampazzo , Cleber Rosa , John Snow Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" move python/qemu/*.py to python/qemu/[machine, qmp]/*.py and update import directives across the tree. This is done to create a PEP420 namespace package, in which we may create subpackages. To do this, the namespace directory ("qemu") should not have any modules in it. Those files will go into new 'machine' and 'qmp' subpackages instead. Implement machine/__init__.py making the top-level classes and functions from its various modules available directly inside the package. Change qmp.py to qmp/__init__.py similarly, such that all of the useful QMP library classes are available directly from "qemu.qmp" instead of "qemu.qmp.qmp". Signed-off-by: John Snow --- python/{qemu => }/.isort.cfg | 0 python/qemu/__init__.py | 11 ------ python/qemu/{ => machine}/.flake8 | 0 python/qemu/machine/__init__.py | 41 +++++++++++++++++++++ python/qemu/{ => machine}/accel.py | 0 python/qemu/{ => machine}/console_socket.py | 0 python/qemu/{ => machine}/machine.py | 16 +++++--- python/qemu/{ => machine}/pylintrc | 0 python/qemu/{ => machine}/qtest.py | 3 +- python/qemu/{qmp.py => qmp/__init__.py} | 12 +++++- tests/acceptance/boot_linux.py | 3 +- tests/qemu-iotests/297 | 2 +- tests/qemu-iotests/300 | 4 +- tests/qemu-iotests/iotests.py | 2 +- tests/vm/basevm.py | 3 +- 15 files changed, 71 insertions(+), 26 deletions(-) rename python/{qemu => }/.isort.cfg (100%) delete mode 100644 python/qemu/__init__.py rename python/qemu/{ => machine}/.flake8 (100%) create mode 100644 python/qemu/machine/__init__.py rename python/qemu/{ => machine}/accel.py (100%) rename python/qemu/{ => machine}/console_socket.py (100%) rename python/qemu/{ => machine}/machine.py (98%) rename python/qemu/{ => machine}/pylintrc (100%) rename python/qemu/{ => machine}/qtest.py (99%) rename python/qemu/{qmp.py => qmp/__init__.py} (96%) diff --git a/python/qemu/.isort.cfg b/python/.isort.cfg similarity index 100% rename from python/qemu/.isort.cfg rename to python/.isort.cfg diff --git a/python/qemu/__init__.py b/python/qemu/__init__.py deleted file mode 100644 index 4ca06c34a4..0000000000 --- a/python/qemu/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -# QEMU library -# -# Copyright (C) 2015-2016 Red Hat Inc. -# Copyright (C) 2012 IBM Corp. -# -# Authors: -# Fam Zheng -# -# This work is licensed under the terms of the GNU GPL, version 2. See -# the COPYING file in the top-level directory. -# diff --git a/python/qemu/.flake8 b/python/qemu/machine/.flake8 similarity index 100% rename from python/qemu/.flake8 rename to python/qemu/machine/.flake8 diff --git a/python/qemu/machine/__init__.py b/python/qemu/machine/__init__.py new file mode 100644 index 0000000000..27b0b19abd --- /dev/null +++ b/python/qemu/machine/__init__.py @@ -0,0 +1,41 @@ +""" +QEMU development and testing library. + +This library provides a few high-level classes for driving QEMU from a +test suite, not intended for production use. + +- QEMUMachine: Configure and Boot a QEMU VM + - QEMUQtestMachine: VM class, with a qtest socket. + +- QEMUQtestProtocol: Connect to, send/receive qtest messages. + +- list_accel: List available accelerators +- kvm_available: Probe for KVM support +- tcg_available: Probe for TCG support +""" + +# Copyright (C) 2020 John Snow for Red Hat Inc. +# Copyright (C) 2015-2016 Red Hat Inc. +# Copyright (C) 2012 IBM Corp. +# +# Authors: +# John Snow +# Fam Zheng +# +# This work is licensed under the terms of the GNU GPL, version 2. See +# the COPYING file in the top-level directory. +# + +from .accel import kvm_available, list_accel, tcg_available +from .machine import QEMUMachine +from .qtest import QEMUQtestMachine, QEMUQtestProtocol + + +__all__ = ( + 'list_accel', + 'kvm_available', + 'tcg_available', + 'QEMUMachine', + 'QEMUQtestProtocol', + 'QEMUQtestMachine', +) diff --git a/python/qemu/accel.py b/python/qemu/machine/accel.py similarity index 100% rename from python/qemu/accel.py rename to python/qemu/machine/accel.py diff --git a/python/qemu/console_socket.py b/python/qemu/machine/console_socket.py similarity index 100% rename from python/qemu/console_socket.py rename to python/qemu/machine/console_socket.py diff --git a/python/qemu/machine.py b/python/qemu/machine/machine.py similarity index 98% rename from python/qemu/machine.py rename to python/qemu/machine/machine.py index 6420f01bed..a5dc305539 100644 --- a/python/qemu/machine.py +++ b/python/qemu/machine/machine.py @@ -38,8 +38,14 @@ Type, ) -from . import console_socket, qmp -from .qmp import QMPMessage, QMPReturnValue, SocketAddrT +from qemu.qmp import ( + QEMUMonitorProtocol, + QMPMessage, + QMPReturnValue, + SocketAddrT, +) + +from . import console_socket LOG = logging.getLogger(__name__) @@ -139,7 +145,7 @@ def __init__(self, self._events: List[QMPMessage] = [] self._iolog: Optional[str] = None self._qmp_set = True # Enable QMP monitor by default. - self._qmp_connection: Optional[qmp.QEMUMonitorProtocol] = None + self._qmp_connection: Optional[QEMUMonitorProtocol] = None self._qemu_full_args: Tuple[str, ...] = () self._temp_dir: Optional[str] = None self._launched = False @@ -314,7 +320,7 @@ def _pre_launch(self) -> None: if self._remove_monitor_sockfile: assert isinstance(self._monitor_address, str) self._remove_files.append(self._monitor_address) - self._qmp_connection = qmp.QEMUMonitorProtocol( + self._qmp_connection = QEMUMonitorProtocol( self._monitor_address, server=True, nickname=self._name @@ -534,7 +540,7 @@ def set_qmp_monitor(self, enabled: bool = True) -> None: self._qmp_set = enabled @property - def _qmp(self) -> qmp.QEMUMonitorProtocol: + def _qmp(self) -> QEMUMonitorProtocol: if self._qmp_connection is None: raise QEMUMachineError("Attempt to access QMP with no connection") return self._qmp_connection diff --git a/python/qemu/pylintrc b/python/qemu/machine/pylintrc similarity index 100% rename from python/qemu/pylintrc rename to python/qemu/machine/pylintrc diff --git a/python/qemu/qtest.py b/python/qemu/machine/qtest.py similarity index 99% rename from python/qemu/qtest.py rename to python/qemu/machine/qtest.py index 39a0cf62fe..53926e434a 100644 --- a/python/qemu/qtest.py +++ b/python/qemu/machine/qtest.py @@ -26,8 +26,9 @@ TextIO, ) +from qemu.qmp import SocketAddrT + from .machine import QEMUMachine -from .qmp import SocketAddrT class QEMUQtestProtocol: diff --git a/python/qemu/qmp.py b/python/qemu/qmp/__init__.py similarity index 96% rename from python/qemu/qmp.py rename to python/qemu/qmp/__init__.py index 2cd4d43036..9606248a3d 100644 --- a/python/qemu/qmp.py +++ b/python/qemu/qmp/__init__.py @@ -1,4 +1,14 @@ -""" QEMU Monitor Protocol Python class """ +""" +QEMU Monitor Protocol (QMP) development library & tooling. + +This package provides a fairly low-level class for communicating to QMP +protocol servers, as implemented by QEMU, the QEMU Guest Agent, and the +QEMU Storage Daemon. This library is not intended for production use. + +`QEMUMonitorProtocol` is the primary class of interest, and all errors +raised derive from `QMPError`. +""" + # Copyright (C) 2009, 2010 Red Hat Inc. # # Authors: diff --git a/tests/acceptance/boot_linux.py b/tests/acceptance/boot_linux.py index 0055dc7cee..54f999e647 100644 --- a/tests/acceptance/boot_linux.py +++ b/tests/acceptance/boot_linux.py @@ -12,8 +12,7 @@ from avocado_qemu import Test, BUILD_DIR -from qemu.accel import kvm_available -from qemu.accel import tcg_available +from qemu.machine import kvm_available, tcg_available from avocado.utils import cloudinit from avocado.utils import network diff --git a/tests/qemu-iotests/297 b/tests/qemu-iotests/297 index 5c5420712b..8236875222 100755 --- a/tests/qemu-iotests/297 +++ b/tests/qemu-iotests/297 @@ -36,7 +36,7 @@ MYPYPATH=../../python/ mypy --warn-unused-configs --disallow-subclassing-any \ --disallow-any-generics --disallow-incomplete-defs \ --disallow-untyped-decorators --no-implicit-optional \ --warn-redundant-casts --warn-unused-ignores \ - --no-implicit-reexport iotests.py + --no-implicit-reexport --namespace-packages iotests.py # success, all done echo "*** done" diff --git a/tests/qemu-iotests/300 b/tests/qemu-iotests/300 index 5b75121b84..a41fac4e1d 100755 --- a/tests/qemu-iotests/300 +++ b/tests/qemu-iotests/300 @@ -23,7 +23,7 @@ import random import re from typing import Dict, List, Optional, Union import iotests -import qemu +from qemu.machine import machine BlockBitmapMapping = List[Dict[str, Union[str, List[Dict[str, str]]]]] @@ -454,7 +454,7 @@ class TestBlockBitmapMappingErrors(TestDirtyBitmapMigration): # the failed migration try: self.vm_b.shutdown() - except qemu.machine.AbnormalShutdown: + except machine.AbnormalShutdown: pass def test_aliased_bitmap_name_too_long(self) -> None: diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 63d2ace93c..6574afd735 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -37,7 +37,7 @@ # pylint: disable=import-error, wrong-import-position sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'python')) -from qemu import qtest +from qemu.machine import qtest from qemu.qmp import QMPMessage # Use this logger for logging messages directly from the iotests module diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 3fac20e929..b38969f61f 100644 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -19,8 +19,7 @@ import time import datetime sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'python')) -from qemu.accel import kvm_available -from qemu.machine import QEMUMachine +from qemu.machine import kvm_available, QEMUMachine import subprocess import hashlib import argparse From patchwork Tue Oct 20 19:35:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Snow X-Patchwork-Id: 1385196 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=LSrOnWY4; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CG3mh3FJgz9sSC for ; Wed, 21 Oct 2020 06:37:21 +1100 (AEDT) Received: from localhost ([::1]:44544 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kUxRe-00067O-8y for incoming@patchwork.ozlabs.org; Tue, 20 Oct 2020 15:37:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42614) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUxQg-00065l-60 for qemu-devel@nongnu.org; Tue, 20 Oct 2020 15:36:18 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:39288) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kUxQe-0000yK-3i for qemu-devel@nongnu.org; Tue, 20 Oct 2020 15:36:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603222572; 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=O75hBaMeQQS9wNLBbf5GNf/pnbAzK1S+i3IWqrPZjlY=; b=LSrOnWY42RPZcN0Y+oSzhlh590wbj+q2O3gNJquwtpi8aiAJAb+eJ3kg3+0bJeZTMSBRM/ VOheOi2kXh8MeUPHxmwvXx7SelIGVmgpDoPeJX42Dvn7ds7+SsawMNjIJwTnmeMqHduhS8 OMQ2K5fIDOYnnzptZvu/eYpbAJ4yds4= 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-334-AuawuyIwP9eiuP_zlxhqfg-1; Tue, 20 Oct 2020 15:36:07 -0400 X-MC-Unique: AuawuyIwP9eiuP_zlxhqfg-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 44032803F5C; Tue, 20 Oct 2020 19:36:06 +0000 (UTC) Received: from scv.redhat.com (ovpn-115-172.rdu2.redhat.com [10.10.115.172]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5D6235C1C2; Tue, 20 Oct 2020 19:36:04 +0000 (UTC) From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v3 02/15] python: add qemu package installer Date: Tue, 20 Oct 2020 15:35:42 -0400 Message-Id: <20201020193555.1493936-3-jsnow@redhat.com> In-Reply-To: <20201020193555.1493936-1-jsnow@redhat.com> References: <20201020193555.1493936-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 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 Received-SPF: pass client-ip=63.128.21.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/20 01:15:43 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=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: Kevin Wolf , Fam Zheng , Ben Widawsky , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Eduardo Habkost , qemu-block@nongnu.org, =?utf-8?q?Ale?= =?utf-8?q?x_Benn=C3=A9e?= , =?utf-8?q?Philippe_Math?= =?utf-8?q?ieu-Daud=C3=A9?= , Andrea Bolognani , Wainer dos Santos Moschetta , Max Reitz , Rohit Shinde , Willian Rampazzo , Cleber Rosa , John Snow Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Add setup.cfg and setup.py, necessary for installing a package via pip. Add a rst document explaining the basics of what this package is for and who to contact for more information. This document will be used as the landing page for the package on PyPI. I am not yet using a pyproject.toml style package manifest, because using pyproject.toml (and PEP-517) style packages means that pip is not able to install in "editable" or "develop" mode, which I consider necessary for the development of this package. Use a light-weight setup.py instead. Signed-off-by: John Snow --- python/PACKAGE.rst | 26 ++++++++++++++++++++++++++ python/setup.cfg | 18 ++++++++++++++++++ python/setup.py | 23 +++++++++++++++++++++++ 3 files changed, 67 insertions(+) create mode 100644 python/PACKAGE.rst create mode 100755 python/setup.cfg create mode 100755 python/setup.py diff --git a/python/PACKAGE.rst b/python/PACKAGE.rst new file mode 100644 index 0000000000..b82f32f489 --- /dev/null +++ b/python/PACKAGE.rst @@ -0,0 +1,26 @@ +QEMU Python Tooling +=================== + +This package provides QEMU tooling used by the QEMU project to build, +configure, and test QEMU. It is not a fully-fledged SDK and it is subject +to change at any time. + +Usage +----- + +The ``qemu.qmp`` subpackage provides a library for communicating with +QMP servers. The ``qemu.machine`` subpackage offers rudimentary +facilities for launching and managing QEMU processes. Refer to each +pacakge's documentation +(``>>> help(qemu.qmp)``, ``>>> help(qemu.machine)``) +for more information. + +Contributing +------------ + +This package is maintained by John Snow as part of +the QEMU source tree. Contributions are welcome and follow the `QEMU +patch submission process +`_. There is a `Gitlab +mirror `_, but +contributions must be sent to the list for inclusion. diff --git a/python/setup.cfg b/python/setup.cfg new file mode 100755 index 0000000000..12b99a796e --- /dev/null +++ b/python/setup.cfg @@ -0,0 +1,18 @@ +[metadata] +name = qemu +maintainer = QEMU Developer Team +maintainer_email = qemu-devel@nongnu.org +url = https://www.qemu.org/ +download_url = https://www.qemu.org/download/ +description = QEMU Python Build, Debug and SDK tooling. +long_description = file:PACKAGE.rst +long_description_content_type = text/x-rst +classifiers = + Development Status :: 3 - Alpha + License :: OSI Approved :: GNU General Public License v2 (GPLv2) + Natural Language :: English + Operating System :: OS Independent + +[options] +python_requires = >= 3.6 +packages = find_namespace: diff --git a/python/setup.py b/python/setup.py new file mode 100755 index 0000000000..e93d0075d1 --- /dev/null +++ b/python/setup.py @@ -0,0 +1,23 @@ +#!/usr/bin/env python3 +""" +QEMU tooling installer script +Copyright (c) 2020 John Snow for Red Hat, Inc. +""" + +import setuptools +import pkg_resources + + +def main(): + """ + QEMU tooling installer + """ + + # https://medium.com/@daveshawley/safely-using-setup-cfg-for-metadata-1babbe54c108 + pkg_resources.require('setuptools>=39.2') + + setuptools.setup() + + +if __name__ == '__main__': + main() From patchwork Tue Oct 20 19:35:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Snow X-Patchwork-Id: 1385202 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=bhxI9alG; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CG3qK71Kcz9sTD for ; Wed, 21 Oct 2020 06:39:41 +1100 (AEDT) Received: from localhost ([::1]:52738 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kUxTv-0001NY-TX for incoming@patchwork.ozlabs.org; Tue, 20 Oct 2020 15:39:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42664) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUxQh-000677-A9 for qemu-devel@nongnu.org; Tue, 20 Oct 2020 15:36:19 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:21834) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kUxQe-0000yQ-6K for qemu-devel@nongnu.org; Tue, 20 Oct 2020 15:36:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603222572; 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=N00sznQw1fc3FzISv2Kqoi2O4X0SNyxs5vwWVLwNv90=; b=bhxI9alGC4UHRe/W9/hPjjPvRWokXy6mG9izCymwQh0klXkloOj5ChO5nR4QXAOsUL5/5A WCjmPuwesTwpqHsWDfZNkkMr2VlLOg9sGVkCsRZbE8BK4A4aA/24AX4fuGFjFRaPHLmVoV CqmINp/AoPEkRLxsou9NB6o4vay71HY= 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-IWrSV4rqOnq-CBtoSzGrqg-1; Tue, 20 Oct 2020 15:36:10 -0400 X-MC-Unique: IWrSV4rqOnq-CBtoSzGrqg-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9B73D1006C8E; Tue, 20 Oct 2020 19:36:08 +0000 (UTC) Received: from scv.redhat.com (ovpn-115-172.rdu2.redhat.com [10.10.115.172]) by smtp.corp.redhat.com (Postfix) with ESMTP id 85A465C1C2; Tue, 20 Oct 2020 19:36:06 +0000 (UTC) From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v3 03/15] python: add VERSION file Date: Tue, 20 Oct 2020 15:35:43 -0400 Message-Id: <20201020193555.1493936-4-jsnow@redhat.com> In-Reply-To: <20201020193555.1493936-1-jsnow@redhat.com> References: <20201020193555.1493936-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 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 Received-SPF: pass client-ip=216.205.24.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/20 01:16:16 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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: Kevin Wolf , Fam Zheng , Ben Widawsky , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Eduardo Habkost , qemu-block@nongnu.org, =?utf-8?q?Ale?= =?utf-8?q?x_Benn=C3=A9e?= , =?utf-8?q?Philippe_Math?= =?utf-8?q?ieu-Daud=C3=A9?= , Andrea Bolognani , Wainer dos Santos Moschetta , Max Reitz , Rohit Shinde , Willian Rampazzo , Cleber Rosa , John Snow Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Python infrastructure as it exists today is not capable reliably of single-sourcing a package version from a parent directory. The authors of pip are working to correct this, but as of today this is not possible to my knowledge. The problem is that when using pip to build and install a python package, it copies files over to a temporary directory and performs its build there. This loses access to any information in the parent directory, including git itself. Further, Python versions have a standard (PEP 440) that may or may not follow QEMU's versioning. In general, it does; but naturally QEMU does not follow PEP 440. To avoid any automatically-generated conflict, a manual version file is preferred. I am proposing: - Python tooling follows the QEMU version, indirectly, but with a major version of 0 to indicate that the API is not expected to be stable. This would mean version 0.5.2.0, 0.5.1.1, 0.5.3.0, etc. - In the event that a Python package needs to be updated independently of the QEMU version, a pre-release alpha version should be preferred, but *only* after inclusion to the qemu development or stable branches. e.g. 0.5.2.0a1, 0.5.2.0a2, and so on should be preferred prior to 5.2.0's release. - The Python core tooling makes absolutely no version compatibility checks or constraints. It *may* work with releases of QEMU from the past or future, but it is not required to. i.e., "qemu.machine" will always remain in lock-step with QEMU. - We reserve the right to split the qemu package into independently versioned subpackages at a later date. This might allow for us to begin versioning QMP independently from QEMU at a later date, if we so choose. Implement this versioning scheme by adding a VERSION file and setting it to 0.5.2.0a1. Signed-off-by: John Snow Reviewed-by: Cleber Rosa --- python/VERSION | 1 + python/setup.cfg | 1 + 2 files changed, 2 insertions(+) create mode 100644 python/VERSION diff --git a/python/VERSION b/python/VERSION new file mode 100644 index 0000000000..ceef7e1ad0 --- /dev/null +++ b/python/VERSION @@ -0,0 +1 @@ +0.5.2.0a1 diff --git a/python/setup.cfg b/python/setup.cfg index 12b99a796e..260f7f4e94 100755 --- a/python/setup.cfg +++ b/python/setup.cfg @@ -1,5 +1,6 @@ [metadata] name = qemu +version = file:VERSION maintainer = QEMU Developer Team maintainer_email = qemu-devel@nongnu.org url = https://www.qemu.org/ From patchwork Tue Oct 20 19:35:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Snow X-Patchwork-Id: 1385208 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=YDFSXaUp; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CG3v90F9Nz9sTD for ; Wed, 21 Oct 2020 06:43:00 +1100 (AEDT) Received: from localhost ([::1]:33360 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kUxX6-0005B0-Qu for incoming@patchwork.ozlabs.org; Tue, 20 Oct 2020 15:42:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42680) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUxQh-00067v-UC for qemu-devel@nongnu.org; Tue, 20 Oct 2020 15:36:19 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:34012) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kUxQe-0000ye-6i for qemu-devel@nongnu.org; Tue, 20 Oct 2020 15:36:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603222574; 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=dKUvLoe1F+LpREDo9JJoOt/3t4Y/T5crpLJPTHUXyAk=; b=YDFSXaUprt5y4Qvw7TAxTvXi//8JnUocBr7liw4hioJPoNe9TlAcYz5ASLbAm61OcX8k3L YAsNXF0QGJGFz8EC4mApbNejiCZHTrhPfzfS6s0mKI8yk/ctj62nbsh4USapgf5VSCI8CL KOeTuDB52HSTnjfO8zr6r3wEkJvKO1M= 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-193-M6H5cBYPNoy8ezWaUuYugg-1; Tue, 20 Oct 2020 15:36:11 -0400 X-MC-Unique: M6H5cBYPNoy8ezWaUuYugg-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 932B71074649; Tue, 20 Oct 2020 19:36:10 +0000 (UTC) Received: from scv.redhat.com (ovpn-115-172.rdu2.redhat.com [10.10.115.172]) by smtp.corp.redhat.com (Postfix) with ESMTP id C6E0F5C1C2; Tue, 20 Oct 2020 19:36:08 +0000 (UTC) From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v3 04/15] python: add directory structure README.rst files Date: Tue, 20 Oct 2020 15:35:44 -0400 Message-Id: <20201020193555.1493936-5-jsnow@redhat.com> In-Reply-To: <20201020193555.1493936-1-jsnow@redhat.com> References: <20201020193555.1493936-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 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 Received-SPF: pass client-ip=216.205.24.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/20 01:16:16 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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: Kevin Wolf , Fam Zheng , Ben Widawsky , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Eduardo Habkost , qemu-block@nongnu.org, =?utf-8?q?Ale?= =?utf-8?q?x_Benn=C3=A9e?= , =?utf-8?q?Philippe_Math?= =?utf-8?q?ieu-Daud=C3=A9?= , Andrea Bolognani , Wainer dos Santos Moschetta , Max Reitz , Rohit Shinde , Willian Rampazzo , Cleber Rosa , John Snow Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Add short readmes to python/, python/qemu/, python/qemu/machine, and python/qemu/machine that explain the directory hierarchy. These readmes are visible when browsing the source on e.g. gitlab/github and are designed to help new developers/users quickly make sense of the source tree. They are not designed for inclusion in a published manual. Signed-off-by: John Snow --- python/README.rst | 27 +++++++++++++++++++++++++++ python/qemu/README.rst | 8 ++++++++ python/qemu/machine/README.rst | 9 +++++++++ python/qemu/qmp/README.rst | 9 +++++++++ 4 files changed, 53 insertions(+) create mode 100644 python/README.rst create mode 100644 python/qemu/README.rst create mode 100644 python/qemu/machine/README.rst create mode 100644 python/qemu/qmp/README.rst diff --git a/python/README.rst b/python/README.rst new file mode 100644 index 0000000000..ff40e4c931 --- /dev/null +++ b/python/README.rst @@ -0,0 +1,27 @@ +QEMU Python Tooling +=================== + +This directory houses Python tooling used by the QEMU project to build, +configure, and test QEMU. It is organized by namespace (``qemu``), and +then by package (``qemu/machine``, ``qemu/qmp``). + +``setup.py`` is used by ``pip`` to install this tooling to the current +environment. You will generally invoke it by doing one of the following: + +1. ``pip3 install .`` will install these packages to your current + environment. If you are inside a virtual environment, they will + install there. If you are not, it will attempt to install to the + global environment, which is not recommended. + +2. ``pip3 install --user .`` will install these packages to your user's + local python packages. If you are inside of a virtual environment, + this will fail. + +If you amend the ``-e`` argument, pip will install in "editable" mode; +which installs a version of the package that uses symlinks to these +files, such that the package always reflects the latest version in your +git tree. + +See `Installing packages using pip and virtual environments +`_ +for more information. diff --git a/python/qemu/README.rst b/python/qemu/README.rst new file mode 100644 index 0000000000..31209c80a5 --- /dev/null +++ b/python/qemu/README.rst @@ -0,0 +1,8 @@ +QEMU Python Namespace +===================== + +This directory serves as the root of a `Python PEP 420 implicit +namespace package <`_. + +Each directory below is assumed to be an installable Python package that +is available under the ``qemu.`` namespace. diff --git a/python/qemu/machine/README.rst b/python/qemu/machine/README.rst new file mode 100644 index 0000000000..73ad23c501 --- /dev/null +++ b/python/qemu/machine/README.rst @@ -0,0 +1,9 @@ +qemu.machine Package +==================== + +This package provides core utilities used for testing and debugging +QEMU. It is used by the iotests, vm tests, and several other utilities +in the ./scripts directory. It is not a fully-fledged SDK and it is +subject to change at any time. + +See the documentation in ``__init__.py`` for more information. diff --git a/python/qemu/qmp/README.rst b/python/qemu/qmp/README.rst new file mode 100644 index 0000000000..f35dffe582 --- /dev/null +++ b/python/qemu/qmp/README.rst @@ -0,0 +1,9 @@ +qemu.qmp Package +================ + +This package provides a library used for connecting to and communicating +with QMP servers. It is used extensively by iotests, vm tests, and other +utilities in the ./scripts directory. It is not a fully-fledged SDK and +is subject to change at any time. + +See the documentation in ``__init__.py`` for more information. From patchwork Tue Oct 20 19:35:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Snow X-Patchwork-Id: 1385214 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=LhChCN04; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CG3xm4LZVz9sSC for ; Wed, 21 Oct 2020 06:45:16 +1100 (AEDT) Received: from localhost ([::1]:41684 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kUxZK-0000IU-Ec for incoming@patchwork.ozlabs.org; Tue, 20 Oct 2020 15:45:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42754) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUxQj-0006Bz-VO for qemu-devel@nongnu.org; Tue, 20 Oct 2020 15:36:22 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:41380) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kUxQg-0000zR-Bu for qemu-devel@nongnu.org; Tue, 20 Oct 2020 15:36:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603222577; 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=kcwfd+/+MZ7OjGERYJDRr402Q9HSZa8LT8zHsdi5Jbo=; b=LhChCN04Usj9TW0G6D2moM6VrENVBQrvutZxXDWPdoNrLfIUOorBYXfPL4a+mBy51tbhf+ 7i4TPtPP78xtYhF8sAclk4kMsiEkL4zVnoX16rpKWgd20gUlNXsokudrqg/lx1z8SOnNux TwzInyLXnrzL1Wym+79iI/iE5WBmtlM= 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-247-BGDhaQoBNBqEImFRPJchHA-1; Tue, 20 Oct 2020 15:36:13 -0400 X-MC-Unique: BGDhaQoBNBqEImFRPJchHA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 879D464084; Tue, 20 Oct 2020 19:36:12 +0000 (UTC) Received: from scv.redhat.com (ovpn-115-172.rdu2.redhat.com [10.10.115.172]) by smtp.corp.redhat.com (Postfix) with ESMTP id BD57F5C1C2; Tue, 20 Oct 2020 19:36:10 +0000 (UTC) From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v3 05/15] python: Add pipenv support Date: Tue, 20 Oct 2020 15:35:45 -0400 Message-Id: <20201020193555.1493936-6-jsnow@redhat.com> In-Reply-To: <20201020193555.1493936-1-jsnow@redhat.com> References: <20201020193555.1493936-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 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 Received-SPF: pass client-ip=216.205.24.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/20 01:16:16 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Fam Zheng , Ben Widawsky , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Eduardo Habkost , qemu-block@nongnu.org, =?utf-8?q?Ale?= =?utf-8?q?x_Benn=C3=A9e?= , =?utf-8?q?Philippe_Math?= =?utf-8?q?ieu-Daud=C3=A9?= , Andrea Bolognani , Wainer dos Santos Moschetta , Max Reitz , Rohit Shinde , Willian Rampazzo , Cleber Rosa , John Snow Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" pipenv is a tool used for managing virtual environments with pinned, explicit dependencies. It is used for precisely recreating python virtual environments. pipenv uses two files to do this: (1) Pipfile, which is similar in purpose and scope to what setup.py lists. It specifies the requisite minimum to get a functional environment for using this package. (2) Pipfile.lock, which is similar in purpose to `pip freeze > requirements.txt`. It specifies a canonical virtual environment used for deployment or testing. This ensures that all users have repeatable results. The primary benefit of using this tool is to ensure repeatable CI results with a known set of packages. Although I endeavor to support as many versions as I can, the fluid nature of the Python toolchain often means tailoring code for fairly specific versions. Note that pipenv is *not* required to install or use this module; this is purely for the sake of repeatable testing by CI or developers. Here, a "blank" pipfile is added with no dependencies, but specifies Python 3.6 for the virtual environment. Pipfile will specify our version minimums, while Pipfile.lock specifies an exact loudout of packages that were known to operate correctly. This latter file provides the real value for easy setup of container images and CI environments. Signed-off-by: John Snow Reviewed-by: Cleber Rosa --- python/Pipfile | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 python/Pipfile diff --git a/python/Pipfile b/python/Pipfile new file mode 100644 index 0000000000..9534830b5e --- /dev/null +++ b/python/Pipfile @@ -0,0 +1,11 @@ +[[source]] +name = "pypi" +url = "https://pypi.org/simple" +verify_ssl = true + +[dev-packages] + +[packages] + +[requires] +python_version = "3.6" From patchwork Tue Oct 20 19:35:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Snow X-Patchwork-Id: 1385199 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Ch6wzQpN; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CG3nG1NZ7z9sSC for ; Wed, 21 Oct 2020 06:37:54 +1100 (AEDT) Received: from localhost ([::1]:46054 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kUxSC-0006pQ-5j for incoming@patchwork.ozlabs.org; Tue, 20 Oct 2020 15:37:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42758) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUxQk-0006DK-Ja for qemu-devel@nongnu.org; Tue, 20 Oct 2020 15:36:22 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:44381) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kUxQh-00010P-Jm for qemu-devel@nongnu.org; Tue, 20 Oct 2020 15:36:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603222578; 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=omoDycTtHseH4ahr6FPNjenJsZ3papI5ZDH4vgT+CbE=; b=Ch6wzQpNQ2pQ6SDs3aZR5kuxF0n70lYa0jL1ni/gT4mGI2eA/rh70Kh7SL7VGAcm7JQ0Rg zCh4QQs58hAIgtJK/NNsmuIGR/tY5TMb1dzzIF3jyvfGdtgiaxYZRvYj2X10H7gTthlw2L LcNy2y6FMs5nP1eAUezqEukw+MuXg48= 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-246-cvICVdNXP_afR-QLo-gtLw-1; Tue, 20 Oct 2020 15:36:16 -0400 X-MC-Unique: cvICVdNXP_afR-QLo-gtLw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 821DF1074665; Tue, 20 Oct 2020 19:36:14 +0000 (UTC) Received: from scv.redhat.com (ovpn-115-172.rdu2.redhat.com [10.10.115.172]) by smtp.corp.redhat.com (Postfix) with ESMTP id B1E3A5C1C2; Tue, 20 Oct 2020 19:36:12 +0000 (UTC) From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v3 06/15] python: add pylint import exceptions Date: Tue, 20 Oct 2020 15:35:46 -0400 Message-Id: <20201020193555.1493936-7-jsnow@redhat.com> In-Reply-To: <20201020193555.1493936-1-jsnow@redhat.com> References: <20201020193555.1493936-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 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 Received-SPF: pass client-ip=63.128.21.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/20 01:15:43 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=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: Kevin Wolf , Fam Zheng , Ben Widawsky , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Eduardo Habkost , qemu-block@nongnu.org, =?utf-8?q?Ale?= =?utf-8?q?x_Benn=C3=A9e?= , =?utf-8?q?Philippe_Math?= =?utf-8?q?ieu-Daud=C3=A9?= , Andrea Bolognani , Wainer dos Santos Moschetta , Max Reitz , Rohit Shinde , Willian Rampazzo , Cleber Rosa , John Snow Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Pylint 2.5.x and 2.6.x have regressions that make import checking inconsistent, see: https: //github.com/PyCQA/pylint/issues/3609 https: //github.com/PyCQA/pylint/issues/3624 https: //github.com/PyCQA/pylint/issues/3651 Pinning to 2.4.4 is worse, because it mandates versions of shared dependencies that are too old for features we want in isort and mypy. Oh well. Signed-off-by: John Snow Reviewed-by: Cleber Rosa --- python/qemu/machine/__init__.py | 3 +++ python/qemu/machine/machine.py | 2 +- python/qemu/machine/qtest.py | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/python/qemu/machine/__init__.py b/python/qemu/machine/__init__.py index 27b0b19abd..15e466a8d3 100644 --- a/python/qemu/machine/__init__.py +++ b/python/qemu/machine/__init__.py @@ -26,6 +26,9 @@ # the COPYING file in the top-level directory. # +# pylint: disable=import-error +# see: https://github.com/PyCQA/pylint/issues/3624 +# see: https://github.com/PyCQA/pylint/issues/3651 from .accel import kvm_available, list_accel, tcg_available from .machine import QEMUMachine from .qtest import QEMUQtestMachine, QEMUQtestProtocol diff --git a/python/qemu/machine/machine.py b/python/qemu/machine/machine.py index a5dc305539..88c51f5052 100644 --- a/python/qemu/machine/machine.py +++ b/python/qemu/machine/machine.py @@ -38,7 +38,7 @@ Type, ) -from qemu.qmp import ( +from qemu.qmp import ( # pylint: disable=import-error QEMUMonitorProtocol, QMPMessage, QMPReturnValue, diff --git a/python/qemu/machine/qtest.py b/python/qemu/machine/qtest.py index 53926e434a..c3adf4e301 100644 --- a/python/qemu/machine/qtest.py +++ b/python/qemu/machine/qtest.py @@ -26,7 +26,7 @@ TextIO, ) -from qemu.qmp import SocketAddrT +from qemu.qmp import SocketAddrT # pylint: disable=import-error from .machine import QEMUMachine From patchwork Tue Oct 20 19:35:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Snow X-Patchwork-Id: 1385209 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=A/LVqtHd; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CG3vS38vsz9sSC for ; Wed, 21 Oct 2020 06:43:16 +1100 (AEDT) Received: from localhost ([::1]:34768 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kUxXO-0005lD-Cp for incoming@patchwork.ozlabs.org; Tue, 20 Oct 2020 15:43:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42830) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUxRB-0006ak-83 for qemu-devel@nongnu.org; Tue, 20 Oct 2020 15:36:49 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:49823) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kUxR3-00013D-35 for qemu-devel@nongnu.org; Tue, 20 Oct 2020 15:36:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603222600; 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=WEYAMuZVmvv6KqsuE25vm/EdjNCrxPlz9x2gzJJ0VG4=; b=A/LVqtHdpltx+QxHRCKJxQaz47UqDkOeKSKg0yZ4x2IPmQBodG/yJu6DrNc9BMgowfHlor 2pk1cJHsTEbKQue5mECcvnRaEznkOMk1/MIPPt11d+th5pRj/MkCxVaKbsQlnVHJ9bY+CS 61RNLFr28NwIzWBA4v8GhgkV3zzEfK0= 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-291-05CcJMdZP_WGuSzQqZvDWQ-1; Tue, 20 Oct 2020 15:36:38 -0400 X-MC-Unique: 05CcJMdZP_WGuSzQqZvDWQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 089FB835B8D; Tue, 20 Oct 2020 19:36:37 +0000 (UTC) Received: from scv.redhat.com (ovpn-115-172.rdu2.redhat.com [10.10.115.172]) by smtp.corp.redhat.com (Postfix) with ESMTP id ACDF15C1C2; Tue, 20 Oct 2020 19:36:14 +0000 (UTC) From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v3 07/15] python: move pylintrc into setup.cfg Date: Tue, 20 Oct 2020 15:35:47 -0400 Message-Id: <20201020193555.1493936-8-jsnow@redhat.com> In-Reply-To: <20201020193555.1493936-1-jsnow@redhat.com> References: <20201020193555.1493936-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 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 Received-SPF: pass client-ip=216.205.24.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/20 01:16:16 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Fam Zheng , Ben Widawsky , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Eduardo Habkost , qemu-block@nongnu.org, =?utf-8?q?Ale?= =?utf-8?q?x_Benn=C3=A9e?= , =?utf-8?q?Philippe_Math?= =?utf-8?q?ieu-Daud=C3=A9?= , Andrea Bolognani , Wainer dos Santos Moschetta , Max Reitz , Rohit Shinde , Willian Rampazzo , Cleber Rosa , John Snow Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Delete the empty settings now that it's sharing a home with settings for other tools. pylint can now be run from this folder as "pylint qemu". Signed-off-by: John Snow Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa --- python/qemu/machine/pylintrc | 58 ------------------------------------ python/setup.cfg | 29 ++++++++++++++++++ 2 files changed, 29 insertions(+), 58 deletions(-) delete mode 100644 python/qemu/machine/pylintrc diff --git a/python/qemu/machine/pylintrc b/python/qemu/machine/pylintrc deleted file mode 100644 index 3f69205000..0000000000 --- a/python/qemu/machine/pylintrc +++ /dev/null @@ -1,58 +0,0 @@ -[MASTER] - -[MESSAGES CONTROL] - -# Disable the message, report, category or checker with the given id(s). You -# can either give multiple identifiers separated by comma (,) or put this -# option multiple times (only on the command line, not in the configuration -# file where it should appear only once). You can also use "--disable=all" to -# disable everything first and then reenable specific checks. For example, if -# you want to run only the similarities checker, you can use "--disable=all -# --enable=similarities". If you want to run only the classes checker, but have -# no Warning level messages displayed, use "--disable=all --enable=classes -# --disable=W". -disable=too-many-arguments, - too-many-instance-attributes, - too-many-public-methods, - -[REPORTS] - -[REFACTORING] - -[MISCELLANEOUS] - -[LOGGING] - -[BASIC] - -# Good variable names which should always be accepted, separated by a comma. -good-names=i, - j, - k, - ex, - Run, - _, - fd, - c, -[VARIABLES] - -[STRING] - -[SPELLING] - -[FORMAT] - -[SIMILARITIES] - -# Ignore imports when computing similarities. -ignore-imports=yes - -[TYPECHECK] - -[CLASSES] - -[IMPORTS] - -[DESIGN] - -[EXCEPTIONS] diff --git a/python/setup.cfg b/python/setup.cfg index 260f7f4e94..a65802d85e 100755 --- a/python/setup.cfg +++ b/python/setup.cfg @@ -17,3 +17,32 @@ classifiers = [options] python_requires = >= 3.6 packages = find_namespace: + +[pylint.messages control] +# Disable the message, report, category or checker with the given id(s). You +# can either give multiple identifiers separated by comma (,) or put this +# option multiple times (only on the command line, not in the configuration +# file where it should appear only once). You can also use "--disable=all" to +# disable everything first and then reenable specific checks. For example, if +# you want to run only the similarities checker, you can use "--disable=all +# --enable=similarities". If you want to run only the classes checker, but have +# no Warning level messages displayed, use "--disable=all --enable=classes +# --disable=W". +disable=too-many-arguments, + too-many-instance-attributes, + too-many-public-methods, + +[pylint.basic] +# Good variable names which should always be accepted, separated by a comma. +good-names=i, + j, + k, + ex, + Run, + _, + fd, + c, + +[pylint.similarities] +# Ignore imports when computing similarities. +ignore-imports=yes From patchwork Tue Oct 20 19:35:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Snow X-Patchwork-Id: 1385204 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=hpKzBvbp; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CG3r50s5xz9sSG for ; Wed, 21 Oct 2020 06:40:21 +1100 (AEDT) Received: from localhost ([::1]:54114 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kUxUZ-0001we-1E for incoming@patchwork.ozlabs.org; Tue, 20 Oct 2020 15:40:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42924) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUxRE-0006e2-Ux for qemu-devel@nongnu.org; Tue, 20 Oct 2020 15:36:52 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:44122) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kUxRB-00013U-LS for qemu-devel@nongnu.org; Tue, 20 Oct 2020 15:36:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603222602; 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=2C3iLMNoVy39ly8zC+0jT3LJ1DATRFtwqRkl9/xGlgk=; b=hpKzBvbpoaFUK3gvVr8sC1/mMEq/EQygsssXsyL0cHsRldaG1VAAnHmB33bZdZ3weZAixU SVXxl+zLCkIRsczDaxQrGK5LWH8WDoe/sFrrU72w4Y9m3LbZN/y/w6t9BSNbKZWshMDLFr /4jIo8S18fLiAo0P4IIhnUCxl0g3JAQ= 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-496-h1tfX_9pP-ym03Spi3V-vg-1; Tue, 20 Oct 2020 15:36:40 -0400 X-MC-Unique: h1tfX_9pP-ym03Spi3V-vg-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 003C31085945; Tue, 20 Oct 2020 19:36:39 +0000 (UTC) Received: from scv.redhat.com (ovpn-115-172.rdu2.redhat.com [10.10.115.172]) by smtp.corp.redhat.com (Postfix) with ESMTP id 339425C1C2; Tue, 20 Oct 2020 19:36:37 +0000 (UTC) From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v3 08/15] python: add pylint to pipenv Date: Tue, 20 Oct 2020 15:35:48 -0400 Message-Id: <20201020193555.1493936-9-jsnow@redhat.com> In-Reply-To: <20201020193555.1493936-1-jsnow@redhat.com> References: <20201020193555.1493936-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 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 Received-SPF: pass client-ip=63.128.21.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/20 01:15:43 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Fam Zheng , Ben Widawsky , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Eduardo Habkost , qemu-block@nongnu.org, =?utf-8?q?Ale?= =?utf-8?q?x_Benn=C3=A9e?= , =?utf-8?q?Philippe_Math?= =?utf-8?q?ieu-Daud=C3=A9?= , Andrea Bolognani , Wainer dos Santos Moschetta , Max Reitz , Rohit Shinde , Willian Rampazzo , Cleber Rosa , John Snow Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" We are specifying >= pylint 2.6.x for two reasons: 1. For setup.cfg support, added in pylint 2.5.x 2. To clarify that we are using a version that has incompatibly dropped bad-whitespace checks. Signed-off-by: John Snow Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa --- python/Pipfile | 1 + python/Pipfile.lock | 127 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 128 insertions(+) create mode 100644 python/Pipfile.lock diff --git a/python/Pipfile b/python/Pipfile index 9534830b5e..1e58986c89 100644 --- a/python/Pipfile +++ b/python/Pipfile @@ -4,6 +4,7 @@ url = "https://pypi.org/simple" verify_ssl = true [dev-packages] +pylint = ">=2.6.0" [packages] diff --git a/python/Pipfile.lock b/python/Pipfile.lock new file mode 100644 index 0000000000..71e0d40ffb --- /dev/null +++ b/python/Pipfile.lock @@ -0,0 +1,127 @@ +{ + "_meta": { + "hash": { + "sha256": "b7ac1f2ad73bc166244c0378298afba64951a16bb749b81a9668dc41f40f941c" + }, + "pipfile-spec": 6, + "requires": { + "python_version": "3.6" + }, + "sources": [ + { + "name": "pypi", + "url": "https://pypi.org/simple", + "verify_ssl": true + } + ] + }, + "default": {}, + "develop": { + "astroid": { + "hashes": [ + "sha256:2f4078c2a41bf377eea06d71c9d2ba4eb8f6b1af2135bec27bbbb7d8f12bb703", + "sha256:bc58d83eb610252fd8de6363e39d4f1d0619c894b0ed24603b881c02e64c7386" + ], + "markers": "python_version >= '3.5'", + "version": "==2.4.2" + }, + "isort": { + "hashes": [ + "sha256:dcab1d98b469a12a1a624ead220584391648790275560e1a43e54c5dceae65e7", + "sha256:dcaeec1b5f0eca77faea2a35ab790b4f3680ff75590bfcb7145986905aab2f58" + ], + "markers": "python_version >= '3.6' and python_version < '4.0'", + "version": "==5.6.4" + }, + "lazy-object-proxy": { + "hashes": [ + "sha256:0c4b206227a8097f05c4dbdd323c50edf81f15db3b8dc064d08c62d37e1a504d", + "sha256:194d092e6f246b906e8f70884e620e459fc54db3259e60cf69a4d66c3fda3449", + "sha256:1be7e4c9f96948003609aa6c974ae59830a6baecc5376c25c92d7d697e684c08", + "sha256:4677f594e474c91da97f489fea5b7daa17b5517190899cf213697e48d3902f5a", + "sha256:48dab84ebd4831077b150572aec802f303117c8cc5c871e182447281ebf3ac50", + "sha256:5541cada25cd173702dbd99f8e22434105456314462326f06dba3e180f203dfd", + "sha256:59f79fef100b09564bc2df42ea2d8d21a64fdcda64979c0fa3db7bdaabaf6239", + "sha256:8d859b89baf8ef7f8bc6b00aa20316483d67f0b1cbf422f5b4dc56701c8f2ffb", + "sha256:9254f4358b9b541e3441b007a0ea0764b9d056afdeafc1a5569eee1cc6c1b9ea", + "sha256:9651375199045a358eb6741df3e02a651e0330be090b3bc79f6d0de31a80ec3e", + "sha256:97bb5884f6f1cdce0099f86b907aa41c970c3c672ac8b9c8352789e103cf3156", + "sha256:9b15f3f4c0f35727d3a0fba4b770b3c4ebbb1fa907dbcc046a1d2799f3edd142", + "sha256:a2238e9d1bb71a56cd710611a1614d1194dc10a175c1e08d75e1a7bcc250d442", + "sha256:a6ae12d08c0bf9909ce12385803a543bfe99b95fe01e752536a60af2b7797c62", + "sha256:ca0a928a3ddbc5725be2dd1cf895ec0a254798915fb3a36af0964a0a4149e3db", + "sha256:cb2c7c57005a6804ab66f106ceb8482da55f5314b7fcb06551db1edae4ad1531", + "sha256:d74bb8693bf9cf75ac3b47a54d716bbb1a92648d5f781fc799347cfc95952383", + "sha256:d945239a5639b3ff35b70a88c5f2f491913eb94871780ebfabb2568bd58afc5a", + "sha256:eba7011090323c1dadf18b3b689845fd96a61ba0a1dfbd7f24b921398affc357", + "sha256:efa1909120ce98bbb3777e8b6f92237f5d5c8ea6758efea36a473e1d38f7d3e4", + "sha256:f3900e8a5de27447acbf900b4750b0ddfd7ec1ea7fbaf11dfa911141bc522af0" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==1.4.3" + }, + "mccabe": { + "hashes": [ + "sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42", + "sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f" + ], + "version": "==0.6.1" + }, + "pylint": { + "hashes": [ + "sha256:bb4a908c9dadbc3aac18860550e870f58e1a02c9f2c204fdf5693d73be061210", + "sha256:bfe68f020f8a0fece830a22dd4d5dddb4ecc6137db04face4c3420a46a52239f" + ], + "index": "pypi", + "version": "==2.6.0" + }, + "six": { + "hashes": [ + "sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259", + "sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'", + "version": "==1.15.0" + }, + "toml": { + "hashes": [ + "sha256:926b612be1e5ce0634a2ca03470f95169cf16f939018233a670519cb4ac58b0f", + "sha256:bda89d5935c2eac546d648028b9901107a595863cb36bae0c73ac804a9b4ce88" + ], + "version": "==0.10.1" + }, + "typed-ast": { + "hashes": [ + "sha256:0666aa36131496aed8f7be0410ff974562ab7eeac11ef351def9ea6fa28f6355", + "sha256:0c2c07682d61a629b68433afb159376e24e5b2fd4641d35424e462169c0a7919", + "sha256:249862707802d40f7f29f6e1aad8d84b5aa9e44552d2cc17384b209f091276aa", + "sha256:24995c843eb0ad11a4527b026b4dde3da70e1f2d8806c99b7b4a7cf491612652", + "sha256:269151951236b0f9a6f04015a9004084a5ab0d5f19b57de779f908621e7d8b75", + "sha256:4083861b0aa07990b619bd7ddc365eb7fa4b817e99cf5f8d9cf21a42780f6e01", + "sha256:498b0f36cc7054c1fead3d7fc59d2150f4d5c6c56ba7fb150c013fbc683a8d2d", + "sha256:4e3e5da80ccbebfff202a67bf900d081906c358ccc3d5e3c8aea42fdfdfd51c1", + "sha256:6daac9731f172c2a22ade6ed0c00197ee7cc1221aa84cfdf9c31defeb059a907", + "sha256:715ff2f2df46121071622063fc7543d9b1fd19ebfc4f5c8895af64a77a8c852c", + "sha256:73d785a950fc82dd2a25897d525d003f6378d1cb23ab305578394694202a58c3", + "sha256:8c8aaad94455178e3187ab22c8b01a3837f8ee50e09cf31f1ba129eb293ec30b", + "sha256:8ce678dbaf790dbdb3eba24056d5364fb45944f33553dd5869b7580cdbb83614", + "sha256:aaee9905aee35ba5905cfb3c62f3e83b3bec7b39413f0a7f19be4e547ea01ebb", + "sha256:bcd3b13b56ea479b3650b82cabd6b5343a625b0ced5429e4ccad28a8973f301b", + "sha256:c9e348e02e4d2b4a8b2eedb48210430658df6951fa484e59de33ff773fbd4b41", + "sha256:d205b1b46085271b4e15f670058ce182bd1199e56b317bf2ec004b6a44f911f6", + "sha256:d43943ef777f9a1c42bf4e552ba23ac77a6351de620aa9acf64ad54933ad4d34", + "sha256:d5d33e9e7af3b34a40dc05f498939f0ebf187f07c385fd58d591c533ad8562fe", + "sha256:fc0fea399acb12edbf8a628ba8d2312f583bdbdb3335635db062fa98cf71fca4", + "sha256:fe460b922ec15dd205595c9b5b99e2f056fd98ae8f9f56b888e7a17dc2b757e7" + ], + "markers": "implementation_name == 'cpython' and python_version < '3.8'", + "version": "==1.4.1" + }, + "wrapt": { + "hashes": [ + "sha256:b62ffa81fb85f4332a4f609cab4ac40709470da05643a082ec1eb88e6d9b97d7" + ], + "version": "==1.12.1" + } + } +} From patchwork Tue Oct 20 19:35:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Snow X-Patchwork-Id: 1385215 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Pt2hQYA3; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CG3zR73rRz9sSG for ; Wed, 21 Oct 2020 06:46:43 +1100 (AEDT) Received: from localhost ([::1]:44336 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kUxai-0001Sw-48 for incoming@patchwork.ozlabs.org; Tue, 20 Oct 2020 15:46:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42936) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUxRF-0006eW-4x for qemu-devel@nongnu.org; Tue, 20 Oct 2020 15:36:53 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:54214) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kUxRC-00013p-3S for qemu-devel@nongnu.org; Tue, 20 Oct 2020 15:36:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603222605; 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=r/C1WJLAlLtQo/RDEEByZTPpqtoGhx6aW15Z0HD2swg=; b=Pt2hQYA3kNftyS1Js29PZtKd7CH+a1Md6+grfIskRtCLEehJg1ImLAR/ZDzU4QcEjimBHp 0kx9LqT9QhIUU1MFJkY3SKrJpoaIzSwK+RnRpQqll2G0sP7bOaUQ0utt1JuWZyQOMX94nz OqG4c/d+IEo6BZj53eA4EcC0hj7Gq14= 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-179-ZTNaz3TzO5iq9LifFqP9nQ-1; Tue, 20 Oct 2020 15:36:42 -0400 X-MC-Unique: ZTNaz3TzO5iq9LifFqP9nQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0EB0D18BE160; Tue, 20 Oct 2020 19:36:41 +0000 (UTC) Received: from scv.redhat.com (ovpn-115-172.rdu2.redhat.com [10.10.115.172]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2CF8B5C1C2; Tue, 20 Oct 2020 19:36:39 +0000 (UTC) From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v3 09/15] python: move flake8 config to setup.cfg Date: Tue, 20 Oct 2020 15:35:49 -0400 Message-Id: <20201020193555.1493936-10-jsnow@redhat.com> In-Reply-To: <20201020193555.1493936-1-jsnow@redhat.com> References: <20201020193555.1493936-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 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 Received-SPF: pass client-ip=216.205.24.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/20 01:16:16 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Fam Zheng , Ben Widawsky , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Eduardo Habkost , qemu-block@nongnu.org, =?utf-8?q?Ale?= =?utf-8?q?x_Benn=C3=A9e?= , =?utf-8?q?Philippe_Math?= =?utf-8?q?ieu-Daud=C3=A9?= , Andrea Bolognani , Wainer dos Santos Moschetta , Max Reitz , Rohit Shinde , Willian Rampazzo , Cleber Rosa , John Snow Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Update the comment concerning the flake8 exception to match commit 42c0dd12, whose commit message stated: A note on the flake8 exception: flake8 will warn on *any* bare except, but pylint's is context-aware and will suppress the warning if you re-raise the exception. Signed-off-by: John Snow Reviewed-by: Cleber Rosa --- python/qemu/machine/.flake8 | 2 -- python/setup.cfg | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) delete mode 100644 python/qemu/machine/.flake8 diff --git a/python/qemu/machine/.flake8 b/python/qemu/machine/.flake8 deleted file mode 100644 index 45d8146f3f..0000000000 --- a/python/qemu/machine/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -extend-ignore = E722 # Pylint handles this, but smarter. \ No newline at end of file diff --git a/python/setup.cfg b/python/setup.cfg index a65802d85e..87506a4f10 100755 --- a/python/setup.cfg +++ b/python/setup.cfg @@ -18,6 +18,9 @@ classifiers = python_requires = >= 3.6 packages = find_namespace: +[flake8] +extend-ignore = E722 # Prefer pylint's bare-except checks to flake8's + [pylint.messages control] # Disable the message, report, category or checker with the given id(s). You # can either give multiple identifiers separated by comma (,) or put this From patchwork Tue Oct 20 19:35:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Snow X-Patchwork-Id: 1385205 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=i5RFU6e9; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CG3rY4RRZz9sSG for ; Wed, 21 Oct 2020 06:40:45 +1100 (AEDT) Received: from localhost ([::1]:55034 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kUxUx-0002Jq-9K for incoming@patchwork.ozlabs.org; Tue, 20 Oct 2020 15:40:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42956) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUxRF-0006fS-El for qemu-devel@nongnu.org; Tue, 20 Oct 2020 15:36:58 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:39465) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kUxRB-000147-Lx for qemu-devel@nongnu.org; Tue, 20 Oct 2020 15:36:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603222608; 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=F7njr2G0ZqRl1HT1Uv6yR8JUfb4aooMrJVskP7i0tMc=; b=i5RFU6e9imBopS7z69u2qyVxjiY1VCIz/8kPdx9gRcEr9yMJd7ZKUoHLG/RtJlzl+geMjE B9iQCm+7aeFDs6+c+yjnp3zooXwgkVbJeaDqCcgQQcVF53M0cl8hq0rDs+dshlA/CRsN4B uCdUYmVbKFqlNEb9SeMyNKH+K95fYAU= 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-250-bEg78Qk8PwW9JQIQkPIAPw-1; Tue, 20 Oct 2020 15:36:44 -0400 X-MC-Unique: bEg78Qk8PwW9JQIQkPIAPw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0921D1009E2F; Tue, 20 Oct 2020 19:36:43 +0000 (UTC) Received: from scv.redhat.com (ovpn-115-172.rdu2.redhat.com [10.10.115.172]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3912F5C1C2; Tue, 20 Oct 2020 19:36:41 +0000 (UTC) From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v3 10/15] python: Add flake8 to pipenv Date: Tue, 20 Oct 2020 15:35:50 -0400 Message-Id: <20201020193555.1493936-11-jsnow@redhat.com> In-Reply-To: <20201020193555.1493936-1-jsnow@redhat.com> References: <20201020193555.1493936-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 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 Received-SPF: pass client-ip=63.128.21.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/20 01:15:43 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=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: Kevin Wolf , Fam Zheng , Ben Widawsky , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Eduardo Habkost , qemu-block@nongnu.org, =?utf-8?q?Ale?= =?utf-8?q?x_Benn=C3=A9e?= , =?utf-8?q?Philippe_Math?= =?utf-8?q?ieu-Daud=C3=A9?= , Andrea Bolognani , Wainer dos Santos Moschetta , Max Reitz , Rohit Shinde , Willian Rampazzo , Cleber Rosa , John Snow Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" flake8 3.5.x does not support the --extend-ignore syntax used in the .flake8 file to gracefully extend default ignores, so 3.6.x is our minimum requirement. There is no known upper bound. flake8 can be run from the python/ directory with no arguments. Signed-off-by: John Snow Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa --- python/Pipfile | 1 + python/Pipfile.lock | 42 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/python/Pipfile b/python/Pipfile index 1e58986c89..d1f7045f68 100644 --- a/python/Pipfile +++ b/python/Pipfile @@ -4,6 +4,7 @@ url = "https://pypi.org/simple" verify_ssl = true [dev-packages] +flake8 = ">=3.6.0" pylint = ">=2.6.0" [packages] diff --git a/python/Pipfile.lock b/python/Pipfile.lock index 71e0d40ffb..eb5ae75a0c 100644 --- a/python/Pipfile.lock +++ b/python/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "b7ac1f2ad73bc166244c0378298afba64951a16bb749b81a9668dc41f40f941c" + "sha256": "9f6d4857a6c72ad40fc1ec1e58cdb76f187a2986ac4156f0027e5eb798ec69a9" }, "pipfile-spec": 6, "requires": { @@ -25,6 +25,22 @@ "markers": "python_version >= '3.5'", "version": "==2.4.2" }, + "flake8": { + "hashes": [ + "sha256:749dbbd6bfd0cf1318af27bf97a14e28e5ff548ef8e5b1566ccfb25a11e7c839", + "sha256:aadae8761ec651813c24be05c6f7b4680857ef6afaae4651a4eccaef97ce6c3b" + ], + "index": "pypi", + "version": "==3.8.4" + }, + "importlib-metadata": { + "hashes": [ + "sha256:77a540690e24b0305878c37ffd421785a6f7e53c8b5720d211b211de8d0e95da", + "sha256:cefa1a2f919b866c5beb7c9f7b0ebb4061f30a8a9bf16d609b000e2dfaceb9c3" + ], + "markers": "python_version < '3.8'", + "version": "==2.0.0" + }, "isort": { "hashes": [ "sha256:dcab1d98b469a12a1a624ead220584391648790275560e1a43e54c5dceae65e7", @@ -67,6 +83,22 @@ ], "version": "==0.6.1" }, + "pycodestyle": { + "hashes": [ + "sha256:2295e7b2f6b5bd100585ebcb1f616591b652db8a741695b3d8f5d28bdc934367", + "sha256:c58a7d2815e0e8d7972bf1803331fb0152f867bd89adf8a01dfd55085434192e" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==2.6.0" + }, + "pyflakes": { + "hashes": [ + "sha256:0d94e0e05a19e57a99444b6ddcf9a6eb2e5c68d3ca1e98e90707af8152c90a92", + "sha256:35b2d75ee967ea93b55750aa9edbbf72813e06a66ba54438df2cfac9e3c27fc8" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==2.2.0" + }, "pylint": { "hashes": [ "sha256:bb4a908c9dadbc3aac18860550e870f58e1a02c9f2c204fdf5693d73be061210", @@ -122,6 +154,14 @@ "sha256:b62ffa81fb85f4332a4f609cab4ac40709470da05643a082ec1eb88e6d9b97d7" ], "version": "==1.12.1" + }, + "zipp": { + "hashes": [ + "sha256:64ad89efee774d1897a58607895d80789c59778ea02185dd846ac38394a8642b", + "sha256:eed8ec0b8d1416b2ca33516a37a08892442f3954dee131e92cfd92d8fe3e7066" + ], + "markers": "python_version >= '3.6'", + "version": "==3.3.0" } } } From patchwork Tue Oct 20 19:35:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Snow X-Patchwork-Id: 1385198 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=V3qb21kI; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CG3n55j8yz9sSC for ; Wed, 21 Oct 2020 06:37:45 +1100 (AEDT) Received: from localhost ([::1]:45782 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kUxS3-0006g0-LX for incoming@patchwork.ozlabs.org; Tue, 20 Oct 2020 15:37:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42898) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUxRD-0006cW-V5 for qemu-devel@nongnu.org; Tue, 20 Oct 2020 15:36:52 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:48702) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kUxRB-000145-Kh for qemu-devel@nongnu.org; Tue, 20 Oct 2020 15:36:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603222608; 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=TKgizk0MLpqSDOKeIHG0PWwnm0n5ZvNcM2RFLIfywRc=; b=V3qb21kIwVnW9ez1696GnBNh6UIqCmIHsU4ekzD31ko5BXEyT7xXL7tJ32e+WxZXaldgnG xt5/Kjija/pGtaqep54+4IprOYhMS/cwvuIcrgdElC7n9XxN/qKySVnv7oeJ49SLNQAWlJ isjb2TBTVO5/pxoanuNMTBot0HrSbM0= 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-363-4A9_EOk1ONyYv1hd5NjGJw-1; Tue, 20 Oct 2020 15:36:46 -0400 X-MC-Unique: 4A9_EOk1ONyYv1hd5NjGJw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 14A8A106F8E4; Tue, 20 Oct 2020 19:36:45 +0000 (UTC) Received: from scv.redhat.com (ovpn-115-172.rdu2.redhat.com [10.10.115.172]) by smtp.corp.redhat.com (Postfix) with ESMTP id 339A85C1C2; Tue, 20 Oct 2020 19:36:43 +0000 (UTC) From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v3 11/15] python: move mypy.ini into setup.cfg Date: Tue, 20 Oct 2020 15:35:51 -0400 Message-Id: <20201020193555.1493936-12-jsnow@redhat.com> In-Reply-To: <20201020193555.1493936-1-jsnow@redhat.com> References: <20201020193555.1493936-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 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 Received-SPF: pass client-ip=216.205.24.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/20 01:16:16 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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: Kevin Wolf , Fam Zheng , Ben Widawsky , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Eduardo Habkost , qemu-block@nongnu.org, =?utf-8?q?Ale?= =?utf-8?q?x_Benn=C3=A9e?= , =?utf-8?q?Philippe_Math?= =?utf-8?q?ieu-Daud=C3=A9?= , Andrea Bolognani , Wainer dos Santos Moschetta , Max Reitz , Rohit Shinde , Willian Rampazzo , Cleber Rosa , John Snow Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" mypy supports reading its configuration values from a central project configuration file; do so. Signed-off-by: John Snow Reviewed-by: Cleber Rosa --- python/mypy.ini | 4 ---- python/setup.cfg | 5 +++++ 2 files changed, 5 insertions(+), 4 deletions(-) delete mode 100644 python/mypy.ini diff --git a/python/mypy.ini b/python/mypy.ini deleted file mode 100644 index 1a581c5f1e..0000000000 --- a/python/mypy.ini +++ /dev/null @@ -1,4 +0,0 @@ -[mypy] -strict = True -python_version = 3.6 -warn_unused_configs = True diff --git a/python/setup.cfg b/python/setup.cfg index 87506a4f10..206e5a91dc 100755 --- a/python/setup.cfg +++ b/python/setup.cfg @@ -21,6 +21,11 @@ packages = find_namespace: [flake8] extend-ignore = E722 # Prefer pylint's bare-except checks to flake8's +[mypy] +strict = True +python_version = 3.6 +warn_unused_configs = True + [pylint.messages control] # Disable the message, report, category or checker with the given id(s). You # can either give multiple identifiers separated by comma (,) or put this From patchwork Tue Oct 20 19:35:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Snow X-Patchwork-Id: 1385216 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=NXoyZeQp; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CG41B6WPsz9sSC for ; Wed, 21 Oct 2020 06:48:14 +1100 (AEDT) Received: from localhost ([::1]:48514 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kUxcC-0003Mb-Qf for incoming@patchwork.ozlabs.org; Tue, 20 Oct 2020 15:48:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43010) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUxRO-0006hC-09 for qemu-devel@nongnu.org; Tue, 20 Oct 2020 15:37:02 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:47270) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kUxRG-00015D-FN for qemu-devel@nongnu.org; Tue, 20 Oct 2020 15:37:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603222612; 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=LCwMXB+l9wAflcGY9A9aM5mZriRqYbdHQdl6/wh429c=; b=NXoyZeQplfCtKIV9g9PYzCawnM3t+M45nLXPVK+yAFqvDJEW29aHLec9cU9+clqAAmeWjl DISDPVlteAGmu8Bqm2u2mdR/7Nv3QAmFS3XQ/tUGxwNu7pIMy+ZPRLYfbrEbunwwxlHP1X 8J6oBk3pbdyGj3wHRR0RQ7f/0QMmWm0= 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-203-CC3l-HzTMwyTlJRaMhHKqQ-1; Tue, 20 Oct 2020 15:36:49 -0400 X-MC-Unique: CC3l-HzTMwyTlJRaMhHKqQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8A3A118BE168; Tue, 20 Oct 2020 19:36:47 +0000 (UTC) Received: from scv.redhat.com (ovpn-115-172.rdu2.redhat.com [10.10.115.172]) by smtp.corp.redhat.com (Postfix) with ESMTP id 40D375C1C2; Tue, 20 Oct 2020 19:36:45 +0000 (UTC) From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v3 12/15] python: add mypy to pipenv Date: Tue, 20 Oct 2020 15:35:52 -0400 Message-Id: <20201020193555.1493936-13-jsnow@redhat.com> In-Reply-To: <20201020193555.1493936-1-jsnow@redhat.com> References: <20201020193555.1493936-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 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 Received-SPF: pass client-ip=216.205.24.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/20 01:16:16 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Fam Zheng , Ben Widawsky , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Eduardo Habkost , qemu-block@nongnu.org, =?utf-8?q?Ale?= =?utf-8?q?x_Benn=C3=A9e?= , =?utf-8?q?Philippe_Math?= =?utf-8?q?ieu-Daud=C3=A9?= , Andrea Bolognani , Wainer dos Santos Moschetta , Max Reitz , Rohit Shinde , Willian Rampazzo , Cleber Rosa , John Snow Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 0.730 appears to be about the oldest version that works with the features we want, including nice human readable output (to make sure iotest 297 passes), and type-parameterized Popen generics. 0.770, however, supports adding 'strict' to the config file, so require at least 0.770. Now that we are checking a namespace package, we need to tell mypy to allow PEP420 namespaces, so modify the mypy config as part of the move. mypy can now be run from the python root by typing 'mypy qemu'. Signed-off-by: John Snow Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa --- python/Pipfile | 1 + python/Pipfile.lock | 37 ++++++++++++++++++++++++++++++++++++- python/setup.cfg | 1 + 3 files changed, 38 insertions(+), 1 deletion(-) diff --git a/python/Pipfile b/python/Pipfile index d1f7045f68..51c537b0d1 100644 --- a/python/Pipfile +++ b/python/Pipfile @@ -5,6 +5,7 @@ verify_ssl = true [dev-packages] flake8 = ">=3.6.0" +mypy = ">=0.770" pylint = ">=2.6.0" [packages] diff --git a/python/Pipfile.lock b/python/Pipfile.lock index eb5ae75a0c..376f95a6a8 100644 --- a/python/Pipfile.lock +++ b/python/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "9f6d4857a6c72ad40fc1ec1e58cdb76f187a2986ac4156f0027e5eb798ec69a9" + "sha256": "65f010a8f2e55e9870d2b7e0d8af129516097d23abf2504f396552748b067ade" }, "pipfile-spec": 6, "requires": { @@ -83,6 +83,33 @@ ], "version": "==0.6.1" }, + "mypy": { + "hashes": [ + "sha256:0a0d102247c16ce93c97066443d11e2d36e6cc2a32d8ccc1f705268970479324", + "sha256:0d34d6b122597d48a36d6c59e35341f410d4abfa771d96d04ae2c468dd201abc", + "sha256:2170492030f6faa537647d29945786d297e4862765f0b4ac5930ff62e300d802", + "sha256:2842d4fbd1b12ab422346376aad03ff5d0805b706102e475e962370f874a5122", + "sha256:2b21ba45ad9ef2e2eb88ce4aeadd0112d0f5026418324176fd494a6824b74975", + "sha256:72060bf64f290fb629bd4a67c707a66fd88ca26e413a91384b18db3876e57ed7", + "sha256:af4e9ff1834e565f1baa74ccf7ae2564ae38c8df2a85b057af1dbbc958eb6666", + "sha256:bd03b3cf666bff8d710d633d1c56ab7facbdc204d567715cb3b9f85c6e94f669", + "sha256:c614194e01c85bb2e551c421397e49afb2872c88b5830e3554f0519f9fb1c178", + "sha256:cf4e7bf7f1214826cf7333627cb2547c0db7e3078723227820d0a2490f117a01", + "sha256:da56dedcd7cd502ccd3c5dddc656cb36113dd793ad466e894574125945653cea", + "sha256:e86bdace26c5fe9cf8cb735e7cedfe7850ad92b327ac5d797c656717d2ca66de", + "sha256:e97e9c13d67fbe524be17e4d8025d51a7dca38f90de2e462243ab8ed8a9178d1", + "sha256:eea260feb1830a627fb526d22fbb426b750d9f5a47b624e8d5e7e004359b219c" + ], + "index": "pypi", + "version": "==0.790" + }, + "mypy-extensions": { + "hashes": [ + "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d", + "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8" + ], + "version": "==0.4.3" + }, "pycodestyle": { "hashes": [ "sha256:2295e7b2f6b5bd100585ebcb1f616591b652db8a741695b3d8f5d28bdc934367", @@ -149,6 +176,14 @@ "markers": "implementation_name == 'cpython' and python_version < '3.8'", "version": "==1.4.1" }, + "typing-extensions": { + "hashes": [ + "sha256:7cb407020f00f7bfc3cb3e7881628838e69d8f3fcab2f64742a5e76b2f841918", + "sha256:99d4073b617d30288f569d3f13d2bd7548c3a7e4c8de87db09a9d29bb3a4a60c", + "sha256:dafc7639cde7f1b6e1acc0f457842a83e722ccca8eef5270af2d74792619a89f" + ], + "version": "==3.7.4.3" + }, "wrapt": { "hashes": [ "sha256:b62ffa81fb85f4332a4f609cab4ac40709470da05643a082ec1eb88e6d9b97d7" diff --git a/python/setup.cfg b/python/setup.cfg index 206e5a91dc..308805b43f 100755 --- a/python/setup.cfg +++ b/python/setup.cfg @@ -25,6 +25,7 @@ extend-ignore = E722 # Prefer pylint's bare-except checks to flake8's strict = True python_version = 3.6 warn_unused_configs = True +namespace_packages = True [pylint.messages control] # Disable the message, report, category or checker with the given id(s). You From patchwork Tue Oct 20 19:35:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Snow X-Patchwork-Id: 1385217 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=cAL54vgq; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CG42Q5sNPz9sSC for ; Wed, 21 Oct 2020 06:49:18 +1100 (AEDT) Received: from localhost ([::1]:51140 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kUxdE-0004SY-FI for incoming@patchwork.ozlabs.org; Tue, 20 Oct 2020 15:49:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43050) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUxRP-0006lG-7B for qemu-devel@nongnu.org; Tue, 20 Oct 2020 15:37:03 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:37288) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kUxRG-00015e-U3 for qemu-devel@nongnu.org; Tue, 20 Oct 2020 15:37:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603222614; 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=tKXXVV2TTbBl/TnsnCs680tcvLcyIZPx2PBncfMYerM=; b=cAL54vgqc4C1o3F49li9QfMv2RvMqBQELdDlLR7kh/P7SW61UbSFkFPFFWOtZDMobJyHtW 8YXJsFpzy91fpXZ9vzee+sL3R7mVbyjtWyIJHZNPEdXNS3Z3RvmIjhtWheTM2hr5AK8tqx FEfQzl/PzFCnMe9vxurU8Qosu49S4rA= 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-56-LMdjon_3PZWysVDWAKDgKA-1; Tue, 20 Oct 2020 15:36:52 -0400 X-MC-Unique: LMdjon_3PZWysVDWAKDgKA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C22BCAD75E; Tue, 20 Oct 2020 19:36:49 +0000 (UTC) Received: from scv.redhat.com (ovpn-115-172.rdu2.redhat.com [10.10.115.172]) by smtp.corp.redhat.com (Postfix) with ESMTP id DDD8F5C1C2; Tue, 20 Oct 2020 19:36:47 +0000 (UTC) From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v3 13/15] python: move .isort.cfg into setup.cfg Date: Tue, 20 Oct 2020 15:35:53 -0400 Message-Id: <20201020193555.1493936-14-jsnow@redhat.com> In-Reply-To: <20201020193555.1493936-1-jsnow@redhat.com> References: <20201020193555.1493936-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 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 Received-SPF: pass client-ip=63.128.21.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/20 01:15:43 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=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: Kevin Wolf , Fam Zheng , Ben Widawsky , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Eduardo Habkost , qemu-block@nongnu.org, =?utf-8?q?Ale?= =?utf-8?q?x_Benn=C3=A9e?= , =?utf-8?q?Philippe_Math?= =?utf-8?q?ieu-Daud=C3=A9?= , Andrea Bolognani , Wainer dos Santos Moschetta , Max Reitz , Rohit Shinde , Willian Rampazzo , Cleber Rosa , John Snow Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: John Snow Reviewed-by: Cleber Rosa --- python/.isort.cfg | 7 ------- python/setup.cfg | 8 ++++++++ 2 files changed, 8 insertions(+), 7 deletions(-) delete mode 100644 python/.isort.cfg diff --git a/python/.isort.cfg b/python/.isort.cfg deleted file mode 100644 index 6d0fd6cc0d..0000000000 --- a/python/.isort.cfg +++ /dev/null @@ -1,7 +0,0 @@ -[settings] -force_grid_wrap=4 -force_sort_within_sections=True -include_trailing_comma=True -line_length=72 -lines_after_imports=2 -multi_line_output=3 \ No newline at end of file diff --git a/python/setup.cfg b/python/setup.cfg index 308805b43f..08def52372 100755 --- a/python/setup.cfg +++ b/python/setup.cfg @@ -55,3 +55,11 @@ good-names=i, [pylint.similarities] # Ignore imports when computing similarities. ignore-imports=yes + +[isort] +force_grid_wrap=4 +force_sort_within_sections=True +include_trailing_comma=True +line_length=72 +lines_after_imports=2 +multi_line_output=3 From patchwork Tue Oct 20 19:35:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: John Snow X-Patchwork-Id: 1385211 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=i4XGvKQD; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CG3vb3FTtz9sSG for ; Wed, 21 Oct 2020 06:43:23 +1100 (AEDT) Received: from localhost ([::1]:35488 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kUxXV-00064R-Bv for incoming@patchwork.ozlabs.org; Tue, 20 Oct 2020 15:43:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43070) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUxRQ-0006nr-0U for qemu-devel@nongnu.org; Tue, 20 Oct 2020 15:37:04 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:46577) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kUxRN-00015j-Cj for qemu-devel@nongnu.org; Tue, 20 Oct 2020 15:37:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603222614; 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=hP/4T0zG6g9Hvmx+Yu4vPHzZJOt+8Khgz5pfCdrLA0g=; b=i4XGvKQDvtx6RkTEhIU4msSyKiJ9e5R7H2+WgPz40acTLbncQ8vkdHw3PXIvoS+EX+FQLh dlPMzpsTvR0oP3AKJHZV0Y2l77R19vpjoWrHzyLhcUoAhZmjgtP1A/FZonDdL6+BDPeQJF k+QwQJyQ2lJvKpOL06A7o04G2Qv8m5A= 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-46-aIfhnjnkPIy0IEjHe-bhEQ-1; Tue, 20 Oct 2020 15:36:53 -0400 X-MC-Unique: aIfhnjnkPIy0IEjHe-bhEQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C964B801AC4; Tue, 20 Oct 2020 19:36:51 +0000 (UTC) Received: from scv.redhat.com (ovpn-115-172.rdu2.redhat.com [10.10.115.172]) by smtp.corp.redhat.com (Postfix) with ESMTP id EE2A85C1C2; Tue, 20 Oct 2020 19:36:49 +0000 (UTC) From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v3 14/15] python/qemu: add isort to pipenv Date: Tue, 20 Oct 2020 15:35:54 -0400 Message-Id: <20201020193555.1493936-15-jsnow@redhat.com> In-Reply-To: <20201020193555.1493936-1-jsnow@redhat.com> References: <20201020193555.1493936-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 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 Received-SPF: pass client-ip=63.128.21.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/20 01:15:43 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Fam Zheng , Ben Widawsky , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Eduardo Habkost , qemu-block@nongnu.org, =?utf-8?q?Ale?= =?utf-8?q?x_Benn=C3=A9e?= , =?utf-8?q?Philippe_Math?= =?utf-8?q?ieu-Daud=C3=A9?= , Andrea Bolognani , Wainer dos Santos Moschetta , Max Reitz , Rohit Shinde , Willian Rampazzo , Cleber Rosa , John Snow Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" isort 5.0.0 through 5.0.4 has a bug that causes it to misinterpret certain "from ..." clauses that are not related to imports. Require 5.0.5 or greater. isort can be run with 'isort -c qemu' from the python root. Signed-off-by: John Snow Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa --- python/Pipfile | 1 + python/Pipfile.lock | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/python/Pipfile b/python/Pipfile index 51c537b0d1..75b96f29d8 100644 --- a/python/Pipfile +++ b/python/Pipfile @@ -5,6 +5,7 @@ verify_ssl = true [dev-packages] flake8 = ">=3.6.0" +isort = ">=5.0.5" mypy = ">=0.770" pylint = ">=2.6.0" diff --git a/python/Pipfile.lock b/python/Pipfile.lock index 376f95a6a8..74563b444c 100644 --- a/python/Pipfile.lock +++ b/python/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "65f010a8f2e55e9870d2b7e0d8af129516097d23abf2504f396552748b067ade" + "sha256": "b89c7a1b8a414f2a4cd708964123fb427d55419ee0b39e088bf2e7d4fbc11979" }, "pipfile-spec": 6, "requires": { @@ -46,7 +46,7 @@ "sha256:dcab1d98b469a12a1a624ead220584391648790275560e1a43e54c5dceae65e7", "sha256:dcaeec1b5f0eca77faea2a35ab790b4f3680ff75590bfcb7145986905aab2f58" ], - "markers": "python_version >= '3.6' and python_version < '4.0'", + "index": "pypi", "version": "==5.6.4" }, "lazy-object-proxy": { From patchwork Tue Oct 20 19:35:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Snow X-Patchwork-Id: 1385212 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=GrwZviTm; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CG3vp6kZxz9sSC for ; Wed, 21 Oct 2020 06:43:34 +1100 (AEDT) Received: from localhost ([::1]:36334 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kUxXg-0006PY-Rj for incoming@patchwork.ozlabs.org; Tue, 20 Oct 2020 15:43:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43094) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUxRR-0006rZ-AU for qemu-devel@nongnu.org; Tue, 20 Oct 2020 15:37:05 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:28314) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kUxRO-00016a-To for qemu-devel@nongnu.org; Tue, 20 Oct 2020 15:37:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603222621; 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=79GMuVmF7GJj2WwzlD3/UxNAdI37gZGCq/ccc0tMkUU=; b=GrwZviTmtxIgrMvZUm2poyJYeeLoED1Rqb09O+NqVEhYhYyM5EOVb15NtaTAe5i5TUUUbS k6PHzN/2hOLFkr7CWTV6zz0oJoZPNhgWzHTBstb6oV/YVkAb7CiFUHSRhCxto+8djcCWt0 RfrenQiyUqQTinCmcNOHuyXwtT/eZ+c= 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-448-XZD-CJmAPoiP4B644XpuiA-1; Tue, 20 Oct 2020 15:36:58 -0400 X-MC-Unique: XZD-CJmAPoiP4B644XpuiA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E3E7810866A4; Tue, 20 Oct 2020 19:36:56 +0000 (UTC) Received: from scv.redhat.com (ovpn-115-172.rdu2.redhat.com [10.10.115.172]) by smtp.corp.redhat.com (Postfix) with ESMTP id F3A6A5C1C2; Tue, 20 Oct 2020 19:36:51 +0000 (UTC) From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v3 15/15] python/qemu: add qemu package itself to pipenv Date: Tue, 20 Oct 2020 15:35:55 -0400 Message-Id: <20201020193555.1493936-16-jsnow@redhat.com> In-Reply-To: <20201020193555.1493936-1-jsnow@redhat.com> References: <20201020193555.1493936-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 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 Received-SPF: pass client-ip=63.128.21.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/20 01:15:43 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Fam Zheng , Ben Widawsky , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Eduardo Habkost , qemu-block@nongnu.org, =?utf-8?q?Ale?= =?utf-8?q?x_Benn=C3=A9e?= , =?utf-8?q?Philippe_Math?= =?utf-8?q?ieu-Daud=C3=A9?= , Andrea Bolognani , Wainer dos Santos Moschetta , Max Reitz , Rohit Shinde , Willian Rampazzo , Cleber Rosa , John Snow Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" This adds the python qemu packages themselves to the pipenv manifest. 'pipenv sync' will create a virtual environment sufficient to use the SDK. 'pipenv sync --dev' will create a virtual environment sufficient to use and test the SDK (with pylint, mypy, isort, flake8, etc.) The qemu packages are installed in 'editable' mode; all changes made to the python package inside the git tree will be reflected in the installed package without reinstallation. This includes changes made via git pull and so on. Signed-off-by: John Snow Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa --- python/Pipfile | 1 + python/Pipfile.lock | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/python/Pipfile b/python/Pipfile index 75b96f29d8..214fb175e7 100644 --- a/python/Pipfile +++ b/python/Pipfile @@ -10,6 +10,7 @@ mypy = ">=0.770" pylint = ">=2.6.0" [packages] +qemu = {editable = true,path = "."} [requires] python_version = "3.6" diff --git a/python/Pipfile.lock b/python/Pipfile.lock index 74563b444c..386ca54ea6 100644 --- a/python/Pipfile.lock +++ b/python/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "b89c7a1b8a414f2a4cd708964123fb427d55419ee0b39e088bf2e7d4fbc11979" + "sha256": "e38d142c3fadc2f2ed849e86f7ebd14e25974dc12228751490aef5a9ee074f2f" }, "pipfile-spec": 6, "requires": { @@ -15,7 +15,12 @@ } ] }, - "default": {}, + "default": { + "qemu": { + "editable": true, + "path": "." + } + }, "develop": { "astroid": { "hashes": [