From patchwork Wed Jun 3 00:15:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Snow X-Patchwork-Id: 281468 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C0000C433E0 for ; Wed, 3 Jun 2020 00:16:49 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 7EAD02067B for ; Wed, 3 Jun 2020 00:16:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="F+WIHC76" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7EAD02067B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:38798 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jgH5M-000066-Ob for qemu-devel@archiver.kernel.org; Tue, 02 Jun 2020 20:16:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35134) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jgH4E-00075a-H5 for qemu-devel@nongnu.org; Tue, 02 Jun 2020 20:15:38 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:30687 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jgH4B-0005ik-SM for qemu-devel@nongnu.org; Tue, 02 Jun 2020 20:15:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591143335; 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=UQ/ZZgI3wkMg+EWOVlunYJIGzvi+Wf9raeLHcHRi3JE=; b=F+WIHC76Q51fY8YxPjmO23GZTIWIpLb1pvtr+iI88zmI6U7YmRNrqaF+hS2Rxa/hsvQv2A q42VdU1PZGWCFWeMAS/KP8j1zNfXkrB+qaULR+XcQwVcNSQR9CeYHwjIcrnn/hGyZqd/7f 06iLGpZR0smuTHiJDpsYrR/HVodaaw8= 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-371-2PSM5acuOZ6NQoaBFF_KJg-1; Tue, 02 Jun 2020 20:15:31 -0400 X-MC-Unique: 2PSM5acuOZ6NQoaBFF_KJg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3440D8018A5; Wed, 3 Jun 2020 00:15:30 +0000 (UTC) Received: from probe.redhat.com (ovpn-112-142.rdu2.redhat.com [10.10.112.142]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7F6DB7F0B8; Wed, 3 Jun 2020 00:15:28 +0000 (UTC) From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH 1/7] python/qemu: create qemu.lib module Date: Tue, 2 Jun 2020 20:15:17 -0400 Message-Id: <20200603001523.18085-2-jsnow@redhat.com> In-Reply-To: <20200603001523.18085-1-jsnow@redhat.com> References: <20200603001523.18085-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.120; envelope-from=jsnow@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/02 20:15:34 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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 , Vladimir Sementsov-Ogievskiy , Eduardo Habkost , qemu-block@nongnu.org, =?utf-8?q?Philippe_Math?= =?utf-8?q?ieu-Daud=C3=A9?= , Markus Armbruster , Max Reitz , John Snow , Stefan Hajnoczi , Cleber Rosa , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" move python/qemu/*.py to python/qemu/core/*.py. To create a namespace package, the 'qemu' directory itself shouldn't have module files in it. Thus, these files will go under a 'lib' package directory instead. Bolster the core/__init__.py file a little bit, Make the top-level classes and functions available directly inside the `qemu.core` namespace, to facilitate a convenient shorthand: > from qemu.core import QEMUQtestMachine, QEMUMonitorProtocol Lastly, update all of the existing import directives. (Note: these scripts were not necessarily tested to see if they still work. Some of these scripts are in obvious states of disrepair and it is beyond the scope of this patch to attempt to fix them.) RFC: For now, I have used the 'qemu.core' namespace to provide a group of related tools. I liked Daniel's suggestion of using qemu.machine (and possible qemu.monitor), but that requires me to rewrite the import statements and understand a bit more about how to configure pylint/mypy/flake8 and it's not right to focus on that right now. In the interest of expedience, I've chosen to keep everything in one package to be able to send another RFC patchset. Signed-off-by: John Snow --- python/qemu/__init__.py | 11 ----- python/qemu/{ => core}/.flake8 | 0 python/qemu/core/__init__.py | 57 +++++++++++++++++++++++ python/qemu/{ => core}/accel.py | 0 python/qemu/{ => core}/machine.py | 0 python/qemu/{ => core}/pylintrc | 0 python/qemu/{ => core}/qmp.py | 0 python/qemu/{ => core}/qtest.py | 0 scripts/device-crash-test | 2 +- scripts/qmp/qemu-ga-client | 2 +- scripts/qmp/qmp | 2 +- scripts/qmp/qmp-shell | 2 +- scripts/qmp/qom-fuse | 2 +- scripts/qmp/qom-get | 2 +- scripts/qmp/qom-list | 2 +- scripts/qmp/qom-set | 2 +- scripts/qmp/qom-tree | 2 +- scripts/render_block_graph.py | 6 +-- scripts/simplebench/bench_block_job.py | 4 +- tests/acceptance/avocado_qemu/__init__.py | 2 +- tests/acceptance/boot_linux.py | 3 +- tests/acceptance/virtio_check_params.py | 2 +- tests/acceptance/virtio_version.py | 2 +- tests/migration/guestperf/engine.py | 2 +- tests/qemu-iotests/235 | 2 +- tests/qemu-iotests/297 | 2 +- tests/qemu-iotests/iotests.py | 4 +- tests/vm/basevm.py | 6 +-- 28 files changed, 82 insertions(+), 39 deletions(-) delete mode 100644 python/qemu/__init__.py rename python/qemu/{ => core}/.flake8 (100%) create mode 100644 python/qemu/core/__init__.py rename python/qemu/{ => core}/accel.py (100%) rename python/qemu/{ => core}/machine.py (100%) rename python/qemu/{ => core}/pylintrc (100%) rename python/qemu/{ => core}/qmp.py (100%) rename python/qemu/{ => core}/qtest.py (100%) diff --git a/python/qemu/__init__.py b/python/qemu/__init__.py deleted file mode 100644 index 4ca06c34a41..00000000000 --- a/python/qemu/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -# QEMU library -# -# Copyright (C) 2015-2016 Red Hat Inc. -# Copyright (C) 2012 IBM Corp. -# -# Authors: -# Fam Zheng -# -# This work is licensed under the terms of the GNU GPL, version 2. See -# the COPYING file in the top-level directory. -# diff --git a/python/qemu/.flake8 b/python/qemu/core/.flake8 similarity index 100% rename from python/qemu/.flake8 rename to python/qemu/core/.flake8 diff --git a/python/qemu/core/__init__.py b/python/qemu/core/__init__.py new file mode 100644 index 00000000000..afc587bfdcf --- /dev/null +++ b/python/qemu/core/__init__.py @@ -0,0 +1,57 @@ +""" +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. + +- QEMUMonitorProtocol: Connect to, send/receive QMP messages. +- QEMUQtestProtocol: Connect to, send/receive qtest message. + +- 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 ( + list_accel, + kvm_available, + tcg_available, +) + +from .qmp import ( + QEMUMonitorProtocol, +) + +from .machine import ( + QEMUMachine, +) + +from .qtest import ( + QEMUQtestProtocol, + QEMUQtestMachine, +) + +__all__ = ( + 'list_accel', + 'kvm_available', + 'tcg_available', + 'QEMUMonitorProtocol', + 'QEMUMachine', + 'QEMUQtestProtocol', + 'QEMUQtestMachine', +) diff --git a/python/qemu/accel.py b/python/qemu/core/accel.py similarity index 100% rename from python/qemu/accel.py rename to python/qemu/core/accel.py diff --git a/python/qemu/machine.py b/python/qemu/core/machine.py similarity index 100% rename from python/qemu/machine.py rename to python/qemu/core/machine.py diff --git a/python/qemu/pylintrc b/python/qemu/core/pylintrc similarity index 100% rename from python/qemu/pylintrc rename to python/qemu/core/pylintrc diff --git a/python/qemu/qmp.py b/python/qemu/core/qmp.py similarity index 100% rename from python/qemu/qmp.py rename to python/qemu/core/qmp.py diff --git a/python/qemu/qtest.py b/python/qemu/core/qtest.py similarity index 100% rename from python/qemu/qtest.py rename to python/qemu/core/qtest.py diff --git a/scripts/device-crash-test b/scripts/device-crash-test index 305d0427af6..e8f878e7b2f 100755 --- a/scripts/device-crash-test +++ b/scripts/device-crash-test @@ -35,7 +35,7 @@ import argparse from itertools import chain sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'python')) -from qemu.machine import QEMUMachine +from qemu.core import QEMUMachine logger = logging.getLogger('device-crash-test') dbg = logger.debug diff --git a/scripts/qmp/qemu-ga-client b/scripts/qmp/qemu-ga-client index ce122984a9c..b1e8add6f5d 100755 --- a/scripts/qmp/qemu-ga-client +++ b/scripts/qmp/qemu-ga-client @@ -42,7 +42,7 @@ import base64 import random sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'python')) -from qemu import qmp +from qemu.core import qmp class QemuGuestAgent(qmp.QEMUMonitorProtocol): diff --git a/scripts/qmp/qmp b/scripts/qmp/qmp index 8e52e4a54de..eaf4b0333aa 100755 --- a/scripts/qmp/qmp +++ b/scripts/qmp/qmp @@ -13,7 +13,7 @@ import sys, os sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'python')) -from qemu.qmp import QEMUMonitorProtocol +from qemu.core import QEMUMonitorProtocol def print_response(rsp, prefix=[]): if type(rsp) == list: diff --git a/scripts/qmp/qmp-shell b/scripts/qmp/qmp-shell index c5eef06f3fd..e819382f68d 100755 --- a/scripts/qmp/qmp-shell +++ b/scripts/qmp/qmp-shell @@ -75,7 +75,7 @@ import atexit import re sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'python')) -from qemu import qmp +from qemu.core import qmp class QMPCompleter(list): def complete(self, text, state): diff --git a/scripts/qmp/qom-fuse b/scripts/qmp/qom-fuse index 5fa6b3bf64d..28f51ec1547 100755 --- a/scripts/qmp/qom-fuse +++ b/scripts/qmp/qom-fuse @@ -17,7 +17,7 @@ import os, posix from errno import * sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'python')) -from qemu.qmp import QEMUMonitorProtocol +from qemu.core import QEMUMonitorProtocol fuse.fuse_python_api = (0, 2) diff --git a/scripts/qmp/qom-get b/scripts/qmp/qom-get index 666df718320..cc97ae09e41 100755 --- a/scripts/qmp/qom-get +++ b/scripts/qmp/qom-get @@ -15,7 +15,7 @@ import sys import os sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'python')) -from qemu.qmp import QEMUMonitorProtocol +from qemu.core import QEMUMonitorProtocol cmd, args = sys.argv[0], sys.argv[1:] socket_path = None diff --git a/scripts/qmp/qom-list b/scripts/qmp/qom-list index 5074fd939f4..2b5e1881b0b 100755 --- a/scripts/qmp/qom-list +++ b/scripts/qmp/qom-list @@ -15,7 +15,7 @@ import sys import os sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'python')) -from qemu.qmp import QEMUMonitorProtocol +from qemu.core import QEMUMonitorProtocol cmd, args = sys.argv[0], sys.argv[1:] socket_path = None diff --git a/scripts/qmp/qom-set b/scripts/qmp/qom-set index 240a78187f9..e001eebe6c4 100755 --- a/scripts/qmp/qom-set +++ b/scripts/qmp/qom-set @@ -15,7 +15,7 @@ import sys import os sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'python')) -from qemu.qmp import QEMUMonitorProtocol +from qemu.core import QEMUMonitorProtocol cmd, args = sys.argv[0], sys.argv[1:] socket_path = None diff --git a/scripts/qmp/qom-tree b/scripts/qmp/qom-tree index 25b0781323c..bd677fd28a0 100755 --- a/scripts/qmp/qom-tree +++ b/scripts/qmp/qom-tree @@ -17,7 +17,7 @@ import sys import os sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'python')) -from qemu.qmp import QEMUMonitorProtocol +from qemu.core import QEMUMonitorProtocol cmd, args = sys.argv[0], sys.argv[1:] socket_path = None diff --git a/scripts/render_block_graph.py b/scripts/render_block_graph.py index da6acf050d1..90301f244ba 100755 --- a/scripts/render_block_graph.py +++ b/scripts/render_block_graph.py @@ -25,10 +25,8 @@ from graphviz import Digraph sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'python')) -from qemu.qmp import ( - QEMUMonitorProtocol, - QMPResponseError, -) +from qemu.core import QEMUMonitorProtocol +from qemu.core.machine import MonitorResponseError def perm(arr): diff --git a/scripts/simplebench/bench_block_job.py b/scripts/simplebench/bench_block_job.py index 9808d696cfe..9ec5c0a42bb 100755 --- a/scripts/simplebench/bench_block_job.py +++ b/scripts/simplebench/bench_block_job.py @@ -25,8 +25,8 @@ import json sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'python')) -from qemu.machine import QEMUMachine -from qemu.qmp import QMPConnectError +from qemu.core import QEMUMachine +from qemu.core.qmp import QMPConnectError def bench_block_job(cmd, cmd_args, qemu_args): diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/avocado_qemu/__init__.py index 77d1c1d9ff1..55e416f7df4 100644 --- a/tests/acceptance/avocado_qemu/__init__.py +++ b/tests/acceptance/avocado_qemu/__init__.py @@ -32,7 +32,7 @@ sys.path.append(os.path.join(SOURCE_DIR, 'python')) -from qemu.machine import QEMUMachine +from qemu.core import QEMUMachine def is_readable_executable_file(path): return os.path.isfile(path) and os.access(path, os.R_OK | os.X_OK) diff --git a/tests/acceptance/boot_linux.py b/tests/acceptance/boot_linux.py index 3aa57e88b0b..334bc628e80 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.core import kvm_available, tcg_available from avocado.utils import cloudinit from avocado.utils import network diff --git a/tests/acceptance/virtio_check_params.py b/tests/acceptance/virtio_check_params.py index 87e6c839d14..51d9d169cc6 100644 --- a/tests/acceptance/virtio_check_params.py +++ b/tests/acceptance/virtio_check_params.py @@ -23,7 +23,7 @@ import logging sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'python')) -from qemu.machine import QEMUMachine +from qemu.core import QEMUMachine from avocado_qemu import Test from avocado import skip diff --git a/tests/acceptance/virtio_version.py b/tests/acceptance/virtio_version.py index 33593c29dd0..dba149ec4fc 100644 --- a/tests/acceptance/virtio_version.py +++ b/tests/acceptance/virtio_version.py @@ -12,7 +12,7 @@ import os sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'python')) -from qemu.machine import QEMUMachine +from qemu.core import QEMUMachine from avocado_qemu import Test # Virtio Device IDs: diff --git a/tests/migration/guestperf/engine.py b/tests/migration/guestperf/engine.py index fd63c666015..fef02e157ca 100644 --- a/tests/migration/guestperf/engine.py +++ b/tests/migration/guestperf/engine.py @@ -29,7 +29,7 @@ sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', '..', 'python')) -from qemu.machine import QEMUMachine +from qemu.core import QEMUMachine class Engine(object): diff --git a/tests/qemu-iotests/235 b/tests/qemu-iotests/235 index d1b10ac36bd..4fc4e600414 100755 --- a/tests/qemu-iotests/235 +++ b/tests/qemu-iotests/235 @@ -25,7 +25,7 @@ from iotests import qemu_img_create, qemu_io, file_path, log sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'python')) -from qemu.machine import QEMUMachine +from qemu.core import QEMUMachine iotests.script_initialize(supported_fmts=['qcow2']) diff --git a/tests/qemu-iotests/297 b/tests/qemu-iotests/297 index 5c5420712b1..8236875222d 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/iotests.py b/tests/qemu-iotests/iotests.py index 19b22bee618..0a6df990f46 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -34,8 +34,8 @@ # pylint: disable=import-error, wrong-import-position sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'python')) -from qemu import qtest -from qemu.qmp import QMPMessage +from qemu.core import qtest +from qemu.core.qmp import QMPMessage assert sys.version_info >= (3, 6) diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index a80b616a08d..fa5e807689f 100644 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -18,9 +18,6 @@ import logging 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 import subprocess import hashlib import optparse @@ -30,6 +27,9 @@ import multiprocessing import traceback +sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'python')) +from qemu.core import kvm_available, QEMUMachine + SSH_KEY = open(os.path.join(os.path.dirname(__file__), "..", "keys", "id_rsa")).read() SSH_PUB_KEY = open(os.path.join(os.path.dirname(__file__), From patchwork Wed Jun 3 00:15:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Snow X-Patchwork-Id: 281467 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3EE28C433DF for ; Wed, 3 Jun 2020 00:18:18 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 0999F2067B for ; Wed, 3 Jun 2020 00:18:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Cv34WTac" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0999F2067B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:44476 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jgH6n-0002TZ-AK for qemu-devel@archiver.kernel.org; Tue, 02 Jun 2020 20:18:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35148) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jgH4I-0007EU-A0 for qemu-devel@nongnu.org; Tue, 02 Jun 2020 20:15:42 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:35868 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jgH4G-0005ks-M7 for qemu-devel@nongnu.org; Tue, 02 Jun 2020 20:15:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591143339; 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=Ia/6ohJHcyQBersi3xa5mO8YWsZ1L7lkNHxmC1J3vRk=; b=Cv34WTac+AMU//W906GQn+syILQRma8i39TEFKs5gu6MJ7Nd576JR/QEnLrhAJNIFqug7j mcc2kN61LmisztgDUUluYaFG7kwnXoRmCEYju7vZf70aMBxIqnkRt4fDAUngZ7GmG4sR/m jo5J3qwOHZaso61hAkM8iZR0+RfK3wI= 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-197-iZGpfqrCMwKF3rQ-UVF-6Q-1; Tue, 02 Jun 2020 20:15:33 -0400 X-MC-Unique: iZGpfqrCMwKF3rQ-UVF-6Q-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id F1A151005510; Wed, 3 Jun 2020 00:15:31 +0000 (UTC) Received: from probe.redhat.com (ovpn-112-142.rdu2.redhat.com [10.10.112.142]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6256278B56; Wed, 3 Jun 2020 00:15:30 +0000 (UTC) From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH 2/7] python/qemu: formalize as package Date: Tue, 2 Jun 2020 20:15:18 -0400 Message-Id: <20200603001523.18085-3-jsnow@redhat.com> In-Reply-To: <20200603001523.18085-1-jsnow@redhat.com> References: <20200603001523.18085-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.81; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/02 15:54:57 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_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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 , Vladimir Sementsov-Ogievskiy , Eduardo Habkost , qemu-block@nongnu.org, =?utf-8?q?Philippe_Math?= =?utf-8?q?ieu-Daud=C3=A9?= , Markus Armbruster , Max Reitz , John Snow , Stefan Hajnoczi , Cleber Rosa , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" NB: I am choosing Python 3.6 here. Although our minimum requirement is 3.5, this code is used only by iotests (so far) under which we have been using a minimum version of 3.6. 3.6 is being preferred here for variable type hint capability, which enables us to use mypy for this package. RFC: This uses the version tags of the parent tree here, so packages will be installed as e.g. 5.0.0, 5.1.0-rc0, etc. Pros: - Easy to tell which versions of QEMU it supports - Simple Cons: - Implies semver, which we do NOT follow for QEMU releases - Implies the package is in a stable state We could also start a separate versioning for just the Python SDK at e.g. 0.1; Pros: - We can use semver, which is expected of Python packaging - Allows us to break compatibility for 0.x releases Cons: - More complex, the mapping from SDK version to QEMU version is less obvious - Requires someone to manage a secondary version commit for the Python SDK. Or, perhaps, we could start versioning with 0.5.0.0, 0.5.1.0, etc to combine a bit of both flavors; bumping the major version number only when incompatible changes to the Python interface itself are made, treating the major version number more like an epoch. Signed-off-by: John Snow --- python/README.rst | 6 ++++++ python/setup.py | 50 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 python/README.rst create mode 100755 python/setup.py diff --git a/python/README.rst b/python/README.rst new file mode 100644 index 00000000000..25f6d93fd5f --- /dev/null +++ b/python/README.rst @@ -0,0 +1,6 @@ +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. diff --git a/python/setup.py b/python/setup.py new file mode 100755 index 00000000000..f897ceac970 --- /dev/null +++ b/python/setup.py @@ -0,0 +1,50 @@ +#!/usr/bin/env3 python +""" +QEMU tooling installer script +Copyright (c) 2020 John Snow for Red Hat, Inc. +""" + +import setuptools + +def main(): + """ + QEMU tooling installer + """ + + kwargs = { + 'name': 'qemu', + 'use_scm_version': { + 'root': '..', + 'relative_to': __file__, + }, + 'maintainer': 'QEMU Developer Team', + 'maintainer_email': 'qemu-devel@nongnu.org', + 'url': 'https://www.qemu.org/', + 'download_url': 'https://www.qemu.org/download/', + 'packages': setuptools.find_namespace_packages(), + 'description': 'QEMU Python Build, Debug and SDK tooling.', + 'classifiers': [ + 'Development Status :: 5 - Production/Stable', + 'License :: OSI Approved :: GNU General Public License v2 (GPLv2)', + 'Natural Language :: English', + 'Operating System :: OS Independent', + ], + 'platforms': [], + 'keywords': [], + 'setup_requires': [ + 'setuptools', + 'setuptools_scm', + ], + 'install_requires': [ + ], + 'python_requires': '>=3.6', + 'long_description_content_type': 'text/x-rst', + } + + with open("README.rst", "r") as fh: + kwargs['long_description'] = fh.read() + + setuptools.setup(**kwargs) + +if __name__ == '__main__': + main() From patchwork Wed Jun 3 00:15:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Snow X-Patchwork-Id: 281465 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9594AC433DF for ; Wed, 3 Jun 2020 00:20:35 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 609B1206A2 for ; Wed, 3 Jun 2020 00:20:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="IEWtPa1v" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 609B1206A2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:52708 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jgH90-0005uw-MO for qemu-devel@archiver.kernel.org; Tue, 02 Jun 2020 20:20:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35192) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jgH4O-0007Us-OJ for qemu-devel@nongnu.org; Tue, 02 Jun 2020 20:15:48 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:35173 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jgH4N-0005oH-CK for qemu-devel@nongnu.org; Tue, 02 Jun 2020 20:15:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591143346; 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=nUeapho7xG6lrQf8jpKbhefC17NBsPW+rctEhHhDxtE=; b=IEWtPa1vk47IVx2N3KsNXV4c7Gx/4JOaIM4vzjnW9sMwK1JZAAh71U21frrsRbwLp6NVOp A5Po3zGpl8umL4Q0f8l9wnF0s7vJtwOlLuDFScluA73i1OR7PBacdn3PcATFGkpu+gErbC iYintIYG4Ag1NHEfbUGaRjgoUj4PRSM= 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-92-tLb9HFjiNJqyXvYPVfWapw-1; Tue, 02 Jun 2020 20:15:38 -0400 X-MC-Unique: tLb9HFjiNJqyXvYPVfWapw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2BC081B18BC5; Wed, 3 Jun 2020 00:15:37 +0000 (UTC) Received: from probe.redhat.com (ovpn-112-142.rdu2.redhat.com [10.10.112.142]) by smtp.corp.redhat.com (Postfix) with ESMTP id A13277F0B5; Wed, 3 Jun 2020 00:15:35 +0000 (UTC) From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH 5/7] python/qemu: add pylint to pipenv Date: Tue, 2 Jun 2020 20:15:21 -0400 Message-Id: <20200603001523.18085-6-jsnow@redhat.com> In-Reply-To: <20200603001523.18085-1-jsnow@redhat.com> References: <20200603001523.18085-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=205.139.110.61; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/02 20:15:45 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_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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 , Vladimir Sementsov-Ogievskiy , Eduardo Habkost , qemu-block@nongnu.org, =?utf-8?q?Philippe_Math?= =?utf-8?q?ieu-Daud=C3=A9?= , Markus Armbruster , Max Reitz , John Snow , Stefan Hajnoczi , Cleber Rosa , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" A bug in pylint 2.5.1 and 2.5.2 causes false positives for relative imports. This version is pinned at 2.5.0 until a fix is available. Signed-off-by: John Snow --- python/Pipfile | 1 + python/Pipfile.lock | 123 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 124 insertions(+) create mode 100644 python/Pipfile.lock diff --git a/python/Pipfile b/python/Pipfile index 9534830b5eb..ddb2b5a5182 100644 --- a/python/Pipfile +++ b/python/Pipfile @@ -4,6 +4,7 @@ url = "https://pypi.org/simple" verify_ssl = true [dev-packages] +pylint = "==2.5.0" [packages] diff --git a/python/Pipfile.lock b/python/Pipfile.lock new file mode 100644 index 00000000000..250f4ebcad7 --- /dev/null +++ b/python/Pipfile.lock @@ -0,0 +1,123 @@ +{ + "_meta": { + "hash": { + "sha256": "7815dedfd7481b645389153dd45e9adb82c72956d0efc74d8f087497624b75e4" + }, + "pipfile-spec": 6, + "requires": { + "python_version": "3.6" + }, + "sources": [ + { + "name": "pypi", + "url": "https://pypi.org/simple", + "verify_ssl": true + } + ] + }, + "default": {}, + "develop": { + "astroid": { + "hashes": [ + "sha256:4c17cea3e592c21b6e222f673868961bad77e1f985cb1694ed077475a89229c1", + "sha256:d8506842a3faf734b81599c8b98dcc423de863adcc1999248480b18bd31a0f38" + ], + "version": "==2.4.1" + }, + "isort": { + "hashes": [ + "sha256:54da7e92468955c4fceacd0c86bd0ec997b0e1ee80d97f67c35a78b719dccab1", + "sha256:6e811fcb295968434526407adb8796944f1988c5b65e8139058f2014cbe100fd" + ], + "version": "==4.3.21" + }, + "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" + ], + "version": "==1.4.3" + }, + "mccabe": { + "hashes": [ + "sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42", + "sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f" + ], + "version": "==0.6.1" + }, + "pylint": { + "hashes": [ + "sha256:588e114e3f9a1630428c35b7dd1c82c1c93e1b0e78ee312ae4724c5e1a1e0245", + "sha256:bd556ba95a4cf55a1fc0004c00cf4560b1e70598a54a74c6904d933c8f3bd5a8" + ], + "index": "pypi", + "version": "==2.5.0" + }, + "six": { + "hashes": [ + "sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259", + "sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced" + ], + "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 Wed Jun 3 00:15:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Snow X-Patchwork-Id: 281466 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B1B09C433E0 for ; Wed, 3 Jun 2020 00:19:29 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 7EAAC2067B for ; Wed, 3 Jun 2020 00:19:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="cc902VaI" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7EAAC2067B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:48760 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jgH7w-0004Gx-OC for qemu-devel@archiver.kernel.org; Tue, 02 Jun 2020 20:19:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35158) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jgH4K-0007Ig-0U for qemu-devel@nongnu.org; Tue, 02 Jun 2020 20:15:44 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:41145 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jgH4I-0005lh-FZ for qemu-devel@nongnu.org; Tue, 02 Jun 2020 20:15:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591143341; 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=583S2j3YMQKGNt/T0XBCDg5chZgehw0hbfqAp8GKu0s=; b=cc902VaI6tGzZtTlN5qV5SAANLDxmLMa/DC8/k5JNcL2RqphOnQl69IUReiLVuBdl+orZQ krMsH9FYRgF6oXbSkqrd2BQmFyn+UexfSGI9owHf9SHdWLIdvBxoe7q0OIGqs6KbN43Nky n+OvAE2ifobpV7d33AMinDQKaZTzces= 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-185-NZDuckv0NhibQTYf1RFjbg-1; Tue, 02 Jun 2020 20:15:40 -0400 X-MC-Unique: NZDuckv0NhibQTYf1RFjbg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DF325107ACF2; Wed, 3 Jun 2020 00:15:38 +0000 (UTC) Received: from probe.redhat.com (ovpn-112-142.rdu2.redhat.com [10.10.112.142]) by smtp.corp.redhat.com (Postfix) with ESMTP id 59DCC78B56; Wed, 3 Jun 2020 00:15:37 +0000 (UTC) From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH 6/7] python/qemu: Add flake8 to pipenv Date: Tue, 2 Jun 2020 20:15:22 -0400 Message-Id: <20200603001523.18085-7-jsnow@redhat.com> In-Reply-To: <20200603001523.18085-1-jsnow@redhat.com> References: <20200603001523.18085-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.120; envelope-from=jsnow@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/02 20:15:34 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN 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 , Vladimir Sementsov-Ogievskiy , Eduardo Habkost , qemu-block@nongnu.org, =?utf-8?q?Philippe_Math?= =?utf-8?q?ieu-Daud=C3=A9?= , Markus Armbruster , Max Reitz , John Snow , Stefan Hajnoczi , Cleber Rosa , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Versions older than 3.6.0 do not appear to work with either pylint 2.5.0 or the type hint syntax in general. Signed-off-by: John Snow --- python/Pipfile | 1 + python/Pipfile.lock | 39 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/python/Pipfile b/python/Pipfile index ddb2b5a5182..fc92038ff7a 100644 --- a/python/Pipfile +++ b/python/Pipfile @@ -5,6 +5,7 @@ verify_ssl = true [dev-packages] pylint = "==2.5.0" +flake8 = ">=3.6.0" [packages] diff --git a/python/Pipfile.lock b/python/Pipfile.lock index 250f4ebcad7..95b942bd383 100644 --- a/python/Pipfile.lock +++ b/python/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "7815dedfd7481b645389153dd45e9adb82c72956d0efc74d8f087497624b75e4" + "sha256": "30d00455625882e5e23868450487697f75d54474f6912091684d570c5c518c11" }, "pipfile-spec": 6, "requires": { @@ -24,6 +24,22 @@ ], "version": "==2.4.1" }, + "flake8": { + "hashes": [ + "sha256:c69ac1668e434d37a2d2880b3ca9aafd54b3a10a3ac1ab101d22f29e29cf8634", + "sha256:ccaa799ef9893cebe69fdfefed76865aeaefbb94cb8545617b2298786a4de9a5" + ], + "index": "pypi", + "version": "==3.8.2" + }, + "importlib-metadata": { + "hashes": [ + "sha256:2a688cbaa90e0cc587f1df48bdc97a6eadccdcd9c35fb3f976a09e3b5016d90f", + "sha256:34513a8a0c4962bc66d35b359558fd8a5e10cd472d37aec5f66858addef32c1e" + ], + "markers": "python_version < '3.8'", + "version": "==1.6.0" + }, "isort": { "hashes": [ "sha256:54da7e92468955c4fceacd0c86bd0ec997b0e1ee80d97f67c35a78b719dccab1", @@ -64,6 +80,20 @@ ], "version": "==0.6.1" }, + "pycodestyle": { + "hashes": [ + "sha256:2295e7b2f6b5bd100585ebcb1f616591b652db8a741695b3d8f5d28bdc934367", + "sha256:c58a7d2815e0e8d7972bf1803331fb0152f867bd89adf8a01dfd55085434192e" + ], + "version": "==2.6.0" + }, + "pyflakes": { + "hashes": [ + "sha256:0d94e0e05a19e57a99444b6ddcf9a6eb2e5c68d3ca1e98e90707af8152c90a92", + "sha256:35b2d75ee967ea93b55750aa9edbbf72813e06a66ba54438df2cfac9e3c27fc8" + ], + "version": "==2.2.0" + }, "pylint": { "hashes": [ "sha256:588e114e3f9a1630428c35b7dd1c82c1c93e1b0e78ee312ae4724c5e1a1e0245", @@ -118,6 +148,13 @@ "sha256:b62ffa81fb85f4332a4f609cab4ac40709470da05643a082ec1eb88e6d9b97d7" ], "version": "==1.12.1" + }, + "zipp": { + "hashes": [ + "sha256:aa36550ff0c0b7ef7fa639055d797116ee891440eac1a56f378e2d3179e0320b", + "sha256:c599e4d75c98f6798c509911d08a22e6c021d074469042177c8c86fb92eefd96" + ], + "version": "==3.1.0" } } }