From nobody Thu May 16 23:31:05 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1591143413; cv=none; d=zohomail.com; s=zohoarc; b=Gw7CjzOB3fgQjnUhbAsE3Hi9eNqi/kLNbh4eHLc+q3PNnZloo7eDaNdj5BF/maJFKRTC9BS66Sn/RSNbwZ6Ym80yByfy8vWR28oeCAKjpI1D2oGJkljsala0nK1uRk0mZa/4+sVQmBcccEzsLuYwhCZT0dcISkvnFvdwKHBl06s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591143413; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=UQ/ZZgI3wkMg+EWOVlunYJIGzvi+Wf9raeLHcHRi3JE=; b=Ffr+Ekii8U8AKgR97WcGp2iU6q7VNkOjTN8DeyBI8VgPCETMiFcj1K/4EnD7PYMR7qSu6fujnOUIyeVWh+BlmOTKFQYXU93TF9BE5Qy2DTC4kQFGGvIZFJfpobLSJ5iHbzEHwThaPOoS2ypkGahEma54l1p4NX8FqQ2ZS0BPJGc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1591143413581832.8587638816374; Tue, 2 Jun 2020 17:16:53 -0700 (PDT) Received: from localhost ([::1]:38798 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jgH5Q-000066-0P for importer@patchew.org; Tue, 02 Jun 2020 20:16:52 -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 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 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) 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= X-MC-Unique: 2PSM5acuOZ6NQoaBFF_KJg-1 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 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=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=20Mathieu-Daud=C3=A9?= , Markus Armbruster , Max Reitz , John Snow , Stefan Hajnoczi , Cleber Rosa , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" move python/qemu/*.py to python/qemu/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 Reviewed-by: Vladimir Sementsov-Ogievskiy --- python/qemu/__init__.py | 11 ----- python/qemu/{ =3D> core}/.flake8 | 0 python/qemu/core/__init__.py | 57 +++++++++++++++++++++++ python/qemu/{ =3D> core}/accel.py | 0 python/qemu/{ =3D> core}/machine.py | 0 python/qemu/{ =3D> core}/pylintrc | 0 python/qemu/{ =3D> core}/qmp.py | 0 python/qemu/{ =3D> 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/{ =3D> core}/.flake8 (100%) create mode 100644 python/qemu/core/__init__.py rename python/qemu/{ =3D> core}/accel.py (100%) rename python/qemu/{ =3D> core}/machine.py (100%) rename python/qemu/{ =3D> core}/pylintrc (100%) rename python/qemu/{ =3D> core}/qmp.py (100%) rename python/qemu/{ =3D> 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__ =3D ( + '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 =20 sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'python')) -from qemu.machine import QEMUMachine +from qemu.core import QEMUMachine =20 logger =3D logging.getLogger('device-crash-test') dbg =3D 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 =20 sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'pytho= n')) -from qemu import qmp +from qemu.core import qmp =20 =20 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 =20 sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'pytho= n')) -from qemu.qmp import QEMUMonitorProtocol +from qemu.core import QEMUMonitorProtocol =20 def print_response(rsp, prefix=3D[]): if type(rsp) =3D=3D 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 =20 sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'pytho= n')) -from qemu import qmp +from qemu.core import qmp =20 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 * =20 sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'pytho= n')) -from qemu.qmp import QEMUMonitorProtocol +from qemu.core import QEMUMonitorProtocol =20 fuse.fuse_python_api =3D (0, 2) =20 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 =20 sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'pytho= n')) -from qemu.qmp import QEMUMonitorProtocol +from qemu.core import QEMUMonitorProtocol =20 cmd, args =3D sys.argv[0], sys.argv[1:] socket_path =3D 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 =20 sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'pytho= n')) -from qemu.qmp import QEMUMonitorProtocol +from qemu.core import QEMUMonitorProtocol =20 cmd, args =3D sys.argv[0], sys.argv[1:] socket_path =3D 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 =20 sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'pytho= n')) -from qemu.qmp import QEMUMonitorProtocol +from qemu.core import QEMUMonitorProtocol =20 cmd, args =3D sys.argv[0], sys.argv[1:] socket_path =3D 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 =20 sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'pytho= n')) -from qemu.qmp import QEMUMonitorProtocol +from qemu.core import QEMUMonitorProtocol =20 cmd, args =3D sys.argv[0], sys.argv[1:] socket_path =3D 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 =20 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 =20 =20 def perm(arr): diff --git a/scripts/simplebench/bench_block_job.py b/scripts/simplebench/b= ench_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 =20 sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'pytho= n')) -from qemu.machine import QEMUMachine -from qemu.qmp import QMPConnectError +from qemu.core import QEMUMachine +from qemu.core.qmp import QMPConnectError =20 =20 def bench_block_job(cmd, cmd_args, qemu_args): diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/a= vocado_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 @@ =20 sys.path.append(os.path.join(SOURCE_DIR, 'python')) =20 -from qemu.machine import QEMUMachine +from qemu.core import QEMUMachine =20 def is_readable_executable_file(path): return os.path.isfile(path) and os.access(path, os.R_OK | os.X_OK) diff --git a/tests/acceptance/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 @@ =20 from avocado_qemu import Test, BUILD_DIR =20 -from qemu.accel import kvm_available -from qemu.accel import tcg_available +from qemu.core import kvm_available, tcg_available =20 from avocado.utils import cloudinit from avocado.utils import network diff --git a/tests/acceptance/virtio_check_params.py b/tests/acceptance/vir= tio_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 =20 sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'pytho= n')) -from qemu.machine import QEMUMachine +from qemu.core import QEMUMachine from avocado_qemu import Test from avocado import skip =20 diff --git a/tests/acceptance/virtio_version.py b/tests/acceptance/virtio_v= ersion.py index 33593c29dd0..dba149ec4fc 100644 --- a/tests/acceptance/virtio_version.py +++ b/tests/acceptance/virtio_version.py @@ -12,7 +12,7 @@ import os =20 sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'pytho= n')) -from qemu.machine import QEMUMachine +from qemu.core import QEMUMachine from avocado_qemu import Test =20 # Virtio Device IDs: diff --git a/tests/migration/guestperf/engine.py b/tests/migration/guestper= f/engine.py index fd63c666015..fef02e157ca 100644 --- a/tests/migration/guestperf/engine.py +++ b/tests/migration/guestperf/engine.py @@ -29,7 +29,7 @@ =20 sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', '..', 'python')) -from qemu.machine import QEMUMachine +from qemu.core import QEMUMachine =20 =20 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 =20 sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'pytho= n')) =20 -from qemu.machine import QEMUMachine +from qemu.core import QEMUMachine =20 iotests.script_initialize(supported_fmts=3D['qcow2']) =20 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=3D../../python/ mypy --warn-unused-configs --dis= allow-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 =20 # 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 @@ =20 # pylint: disable=3Dimport-error, wrong-import-position sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'pytho= n')) -from qemu import qtest -from qemu.qmp import QMPMessage +from qemu.core import qtest +from qemu.core.qmp import QMPMessage =20 assert sys.version_info >=3D (3, 6) =20 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__), '..', '..', 'pytho= n')) -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 =20 +sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'pytho= n')) +from qemu.core import kvm_available, QEMUMachine + SSH_KEY =3D open(os.path.join(os.path.dirname(__file__), "..", "keys", "id_rsa")).read() SSH_PUB_KEY =3D open(os.path.join(os.path.dirname(__file__), --=20 2.21.3 From nobody Thu May 16 23:31:05 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1591143501; cv=none; d=zohomail.com; s=zohoarc; b=hJxnSivK3jZdr/rpUlDeB+xQGHb0nnpMJ0ycKxZTyhftJDyCSi47edDn9B+rgxWFqepCOzRC2ewcV+wwok4i0wxSEk3AOYPJZlASti/bVbMgpMB2RbcUPJpeMhvRQqlVZugq4/vjziHZeeSNgF/pNMn5eu3C6qZsPZ9HENeLLfk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591143501; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Ia/6ohJHcyQBersi3xa5mO8YWsZ1L7lkNHxmC1J3vRk=; b=jRe2rPr1fXiX9sBKNWt1Fb0Lg9AWVlW8pupt5FAjA4UwmrOEdS69+fe+9NIetVrPvDww5b0aK5TguBd4XaxuPZfDOjLRnAFpIxNTm95BhegZoeS34E+p0+/ksow6FxYwlQb+QOPUxMgZtU+cjBSQjIFh5t1kmxHPliNHZFU1hyw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1591143501455128.23981530707624; Tue, 2 Jun 2020 17:18:21 -0700 (PDT) Received: from localhost ([::1]:44476 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jgH6q-0002TZ-83 for importer@patchew.org; Tue, 02 Jun 2020 20:18:20 -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 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 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) 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= X-MC-Unique: iZGpfqrCMwKF3rQ-UVF-6Q-1 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 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=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=20Mathieu-Daud=C3=A9?= , Markus Armbruster , Max Reitz , John Snow , Stefan Hajnoczi , Cleber Rosa , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Vladimir Sementsov-Ogievskiy --- 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 =3D { + '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 (GPL= v2)', + 'Natural Language :: English', + 'Operating System :: OS Independent', + ], + 'platforms': [], + 'keywords': [], + 'setup_requires': [ + 'setuptools', + 'setuptools_scm', + ], + 'install_requires': [ + ], + 'python_requires': '>=3D3.6', + 'long_description_content_type': 'text/x-rst', + } + + with open("README.rst", "r") as fh: + kwargs['long_description'] =3D fh.read() + + setuptools.setup(**kwargs) + +if __name__ =3D=3D '__main__': + main() --=20 2.21.3 From nobody Thu May 16 23:31:05 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1591143417; cv=none; d=zohomail.com; s=zohoarc; b=SAO6AYovtYTxsyJlx1pDMxX1c/HT4fqzCRDanQfpAPkw0w93+Ce+fQv0xViu32y2wjeSVuVd7a704pKzwj4oWQu7/2IiZahKnh0SpcTZymM4U1UvSZ92QYuv68rcMjyRxUdeW6BslmGrqpuN+QhBjbNN/pjxSCNm+bCHskVuRck= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591143417; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=rnq6PPtGF+8POfZDXkRhMlV8IawKgYHb5YtRpAtTuWg=; b=C2wzKL/3cftsex1dUxUKsn3hfZC5LeNdsvPriKX/ukDD9RiFD47tOaFkaerPOlTUWaaRHewpgezbDsVBfgawZ3a6o5T1jBl3yHsudZkyus7/O/mqRb+4yns53wx6EahML6KlJ/I5BUR4o0F2kD9sM2spEjTT0ulIvV/gMZSd8Uc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1591143417728738.7540482951339; Tue, 2 Jun 2020 17:16:57 -0700 (PDT) Received: from localhost ([::1]:39268 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jgH5U-0000Id-C7 for importer@patchew.org; Tue, 02 Jun 2020 20:16:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35144) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jgH4G-0007A1-Ge for qemu-devel@nongnu.org; Tue, 02 Jun 2020 20:15:40 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:45393 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 1jgH4F-0005jJ-OJ for qemu-devel@nongnu.org; Tue, 02 Jun 2020 20:15:40 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-250-Y-xkLa4NPY6CXY_A7mnsGg-1; Tue, 02 Jun 2020 20:15:34 -0400 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 B3D311B18BDE; Wed, 3 Jun 2020 00:15:33 +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 294387F0B5; Wed, 3 Jun 2020 00:15:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591143338; 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=rnq6PPtGF+8POfZDXkRhMlV8IawKgYHb5YtRpAtTuWg=; b=LWjpUrRLJVAhgEuTe19uuBz6rb30I3L9Y1VER9R/CsZ1C0MY3UvzBqt/5F68obo/UN94rw 9OY9tR768ikukTm7Zp6zSvddqjF1r77i/LFgx6Gyunf/XzxAQUyBiwBek3nVg/uqPhVm8M uDBaJEsM91AGRO7RgLbjW/mlwxYCj8Q= X-MC-Unique: Y-xkLa4NPY6CXY_A7mnsGg-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH 3/7] python/qemu: add README.rst Date: Tue, 2 Jun 2020 20:15:19 -0400 Message-Id: <20200603001523.18085-4-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 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=205.139.110.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 17:45: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_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=20Mathieu-Daud=C3=A9?= , Markus Armbruster , Max Reitz , John Snow , Stefan Hajnoczi , Cleber Rosa , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Add a short readme that explains the package hierarchy, which will be visible while browsing the source on e.g. gitlab/github. Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy --- python/qemu/README.rst | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 python/qemu/README.rst diff --git a/python/qemu/README.rst b/python/qemu/README.rst new file mode 100644 index 00000000000..96447b90616 --- /dev/null +++ b/python/qemu/README.rst @@ -0,0 +1,8 @@ +python/qemu/ +------------ + +This directory serves as the root of a `Python PEP 420 implicit +namespace package <`_. + +Each directory below is assumed to be an installable Python module that +will be available under the ``qemu.`` namespace. --=20 2.21.3 From nobody Thu May 16 23:31:05 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1591143574; cv=none; d=zohomail.com; s=zohoarc; b=X4rJaX6gdwd/cpDgUyB6s7iKpEJW0pyTPl66b/qDL5X95P41Xdyz/4sxRDTuOCHxpRSoH7SREWkfG6U+8sYcVCsUGaWjL+XC8lTery/cR8o9dWvKYMMdXn/YVfSbBo15wrb2HfpcmLNobQO9PV6h/JoHp7Nb0d+DIi9UgJVwivQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591143574; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=A3eSWb5ZiqVJd/J6wtvOwqLRIaFwn4vrmHQmyGByifQ=; b=h/neb2oqqUtAmSTdySeTKslGdjmoJLBrnczcfPuNvuh7lY51aypbrJNv7gGzDUJc+I4pTnlt97jOGO9KB6Hz8LUZUIYdWnXJ6JrLwzi26DcnHAOl2FosU68wclUAP88EsLHOY6iLX2R8zcisdKrRuHMbJzHg9Uszt4Ye3zp+JLI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1591143574807960.5781677154272; Tue, 2 Jun 2020 17:19:34 -0700 (PDT) Received: from localhost ([::1]:48940 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jgH81-0004LM-M7 for importer@patchew.org; Tue, 02 Jun 2020 20:19:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35172) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jgH4L-0007NU-R4 for qemu-devel@nongnu.org; Tue, 02 Jun 2020 20:15:45 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:26913 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 1jgH4K-0005mO-75 for qemu-devel@nongnu.org; Tue, 02 Jun 2020 20:15:45 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-226-89St3dN4NkOQO0BooYt1uA-1; Tue, 02 Jun 2020 20:15:36 -0400 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 721AE107ACCA; Wed, 3 Jun 2020 00:15:35 +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 E25777F0B5; Wed, 3 Jun 2020 00:15:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591143343; 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=A3eSWb5ZiqVJd/J6wtvOwqLRIaFwn4vrmHQmyGByifQ=; b=G3x2kPbCgtHtd9oq7RNCop7e0Y61ET4PchlSXZGWu6rvZ6EPIfPtVgOtRrO5xq910sGCLN v5euK5ZUZMSkZiYGXu9B4oHJybfkfTquCMdqZFdBQWt5ojequbiVeXVQBWXhavzyzFRtAO 3knYyUAu83a2zAYupx4bSap65sC+dX0= X-MC-Unique: 89St3dN4NkOQO0BooYt1uA-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH 4/7] python/qemu: Add pipenv support Date: Tue, 2 Jun 2020 20:15:20 -0400 Message-Id: <20200603001523.18085-5-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 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=205.139.110.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 17:45: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_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=20Mathieu-Daud=C3=A9?= , Markus Armbruster , Max Reitz , John Snow , Stefan Hajnoczi , Cleber Rosa , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" pipenv is a tool used for managing virtual environments with precisely specified dependencies. It is separate from the dependencies listed in setup.py, which are (by 'best practices') not supposed to be pinned. Note that pipenv is not required to install or use this module; this is just a convenience for in-tree developing. 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: Vladimir Sementsov-Ogievskiy --- python/Pipfile | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 python/Pipfile diff --git a/python/Pipfile b/python/Pipfile new file mode 100644 index 00000000000..9534830b5eb --- /dev/null +++ b/python/Pipfile @@ -0,0 +1,11 @@ +[[source]] +name =3D "pypi" +url =3D "https://pypi.org/simple" +verify_ssl =3D true + +[dev-packages] + +[packages] + +[requires] +python_version =3D "3.6" --=20 2.21.3 From nobody Thu May 16 23:31:05 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1591143639; cv=none; d=zohomail.com; s=zohoarc; b=O7fB6J6vA+nM1q76+aaNWbAawd5p2hHujz3Mk6EpmolkNwi41pIWe8JY01BU+sN82evhoi3FBWCvtO1A25XSXXbYUNUWgiYLnpk0vhW05UL75tUgwtCNW54OUloHquvyNNumAeQk2uj1lrWoCnkunFlGqOZ/jTXU7m1i4dLXsHc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591143639; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=nUeapho7xG6lrQf8jpKbhefC17NBsPW+rctEhHhDxtE=; b=CfW5qjU4/PxLyk60xbcLNQBo850M0PRQS7gea2tjfNBd9h852utAbPRO20Aby9TaVp0qo65b8+YZcWq83T7shQiOW+200BxjhxvA0D0U4ghXeWMVbew5kCS9ojUp5oubVNvAeia8vXTiYxuwtognKGJPP4M8Ir/mhhg7Aue7ar0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1591143639003982.7292811053388; Tue, 2 Jun 2020 17:20:39 -0700 (PDT) Received: from localhost ([::1]:52708 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jgH93-0005uw-Hx for importer@patchew.org; Tue, 02 Jun 2020 20:20:37 -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 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 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) 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= X-MC-Unique: tLb9HFjiNJqyXvYPVfWapw-1 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 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=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=20Mathieu-Daud=C3=A9?= , Markus Armbruster , Max Reitz , John Snow , Stefan Hajnoczi , Cleber Rosa , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Vladimir Sementsov-Ogievskiy --- 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 =3D "https://pypi.org/simple" verify_ssl =3D true =20 [dev-packages] +pylint =3D "=3D=3D2.5.0" =20 [packages] =20 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": "7815dedfd7481b645389153dd45e9adb82c72956d0efc74d8f0= 87497624b75e4" + }, + "pipfile-spec": 6, + "requires": { + "python_version": "3.6" + }, + "sources": [ + { + "name": "pypi", + "url": "https://pypi.org/simple", + "verify_ssl": true + } + ] + }, + "default": {}, + "develop": { + "astroid": { + "hashes": [ + "sha256:4c17cea3e592c21b6e222f673868961bad77e1f985cb1694ed= 077475a89229c1", + "sha256:d8506842a3faf734b81599c8b98dcc423de863adcc19992484= 80b18bd31a0f38" + ], + "version": "=3D=3D2.4.1" + }, + "isort": { + "hashes": [ + "sha256:54da7e92468955c4fceacd0c86bd0ec997b0e1ee80d97f67c3= 5a78b719dccab1", + "sha256:6e811fcb295968434526407adb8796944f1988c5b65e813905= 8f2014cbe100fd" + ], + "version": "=3D=3D4.3.21" + }, + "lazy-object-proxy": { + "hashes": [ + "sha256:0c4b206227a8097f05c4dbdd323c50edf81f15db3b8dc064d0= 8c62d37e1a504d", + "sha256:194d092e6f246b906e8f70884e620e459fc54db3259e60cf69= a4d66c3fda3449", + "sha256:1be7e4c9f96948003609aa6c974ae59830a6baecc5376c25c9= 2d7d697e684c08", + "sha256:4677f594e474c91da97f489fea5b7daa17b5517190899cf213= 697e48d3902f5a", + "sha256:48dab84ebd4831077b150572aec802f303117c8cc5c871e182= 447281ebf3ac50", + "sha256:5541cada25cd173702dbd99f8e22434105456314462326f06d= ba3e180f203dfd", + "sha256:59f79fef100b09564bc2df42ea2d8d21a64fdcda64979c0fa3= db7bdaabaf6239", + "sha256:8d859b89baf8ef7f8bc6b00aa20316483d67f0b1cbf422f5b4= dc56701c8f2ffb", + "sha256:9254f4358b9b541e3441b007a0ea0764b9d056afdeafc1a556= 9eee1cc6c1b9ea", + "sha256:9651375199045a358eb6741df3e02a651e0330be090b3bc79f= 6d0de31a80ec3e", + "sha256:97bb5884f6f1cdce0099f86b907aa41c970c3c672ac8b9c835= 2789e103cf3156", + "sha256:9b15f3f4c0f35727d3a0fba4b770b3c4ebbb1fa907dbcc046a= 1d2799f3edd142", + "sha256:a2238e9d1bb71a56cd710611a1614d1194dc10a175c1e08d75= e1a7bcc250d442", + "sha256:a6ae12d08c0bf9909ce12385803a543bfe99b95fe01e752536= a60af2b7797c62", + "sha256:ca0a928a3ddbc5725be2dd1cf895ec0a254798915fb3a36af0= 964a0a4149e3db", + "sha256:cb2c7c57005a6804ab66f106ceb8482da55f5314b7fcb06551= db1edae4ad1531", + "sha256:d74bb8693bf9cf75ac3b47a54d716bbb1a92648d5f781fc799= 347cfc95952383", + "sha256:d945239a5639b3ff35b70a88c5f2f491913eb94871780ebfab= b2568bd58afc5a", + "sha256:eba7011090323c1dadf18b3b689845fd96a61ba0a1dfbd7f24= b921398affc357", + "sha256:efa1909120ce98bbb3777e8b6f92237f5d5c8ea6758efea36a= 473e1d38f7d3e4", + "sha256:f3900e8a5de27447acbf900b4750b0ddfd7ec1ea7fbaf11dfa= 911141bc522af0" + ], + "version": "=3D=3D1.4.3" + }, + "mccabe": { + "hashes": [ + "sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d= 64e79735b80d42", + "sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb= 0f125271b8831f" + ], + "version": "=3D=3D0.6.1" + }, + "pylint": { + "hashes": [ + "sha256:588e114e3f9a1630428c35b7dd1c82c1c93e1b0e78ee312ae4= 724c5e1a1e0245", + "sha256:bd556ba95a4cf55a1fc0004c00cf4560b1e70598a54a74c690= 4d933c8f3bd5a8" + ], + "index": "pypi", + "version": "=3D=3D2.5.0" + }, + "six": { + "hashes": [ + "sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8b= afd8ce11080259", + "sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426= e82dddb04a5ced" + ], + "version": "=3D=3D1.15.0" + }, + "toml": { + "hashes": [ + "sha256:926b612be1e5ce0634a2ca03470f95169cf16f939018233a67= 0519cb4ac58b0f", + "sha256:bda89d5935c2eac546d648028b9901107a595863cb36bae0c7= 3ac804a9b4ce88" + ], + "version": "=3D=3D0.10.1" + }, + "typed-ast": { + "hashes": [ + "sha256:0666aa36131496aed8f7be0410ff974562ab7eeac11ef351de= f9ea6fa28f6355", + "sha256:0c2c07682d61a629b68433afb159376e24e5b2fd4641d35424= e462169c0a7919", + "sha256:249862707802d40f7f29f6e1aad8d84b5aa9e44552d2cc1738= 4b209f091276aa", + "sha256:24995c843eb0ad11a4527b026b4dde3da70e1f2d8806c99b7b= 4a7cf491612652", + "sha256:269151951236b0f9a6f04015a9004084a5ab0d5f19b57de779= f908621e7d8b75", + "sha256:4083861b0aa07990b619bd7ddc365eb7fa4b817e99cf5f8d9c= f21a42780f6e01", + "sha256:498b0f36cc7054c1fead3d7fc59d2150f4d5c6c56ba7fb150c= 013fbc683a8d2d", + "sha256:4e3e5da80ccbebfff202a67bf900d081906c358ccc3d5e3c8a= ea42fdfdfd51c1", + "sha256:6daac9731f172c2a22ade6ed0c00197ee7cc1221aa84cfdf9c= 31defeb059a907", + "sha256:715ff2f2df46121071622063fc7543d9b1fd19ebfc4f5c8895= af64a77a8c852c", + "sha256:73d785a950fc82dd2a25897d525d003f6378d1cb23ab305578= 394694202a58c3", + "sha256:8c8aaad94455178e3187ab22c8b01a3837f8ee50e09cf31f1b= a129eb293ec30b", + "sha256:8ce678dbaf790dbdb3eba24056d5364fb45944f33553dd5869= b7580cdbb83614", + "sha256:aaee9905aee35ba5905cfb3c62f3e83b3bec7b39413f0a7f19= be4e547ea01ebb", + "sha256:bcd3b13b56ea479b3650b82cabd6b5343a625b0ced5429e4cc= ad28a8973f301b", + "sha256:c9e348e02e4d2b4a8b2eedb48210430658df6951fa484e59de= 33ff773fbd4b41", + "sha256:d205b1b46085271b4e15f670058ce182bd1199e56b317bf2ec= 004b6a44f911f6", + "sha256:d43943ef777f9a1c42bf4e552ba23ac77a6351de620aa9acf6= 4ad54933ad4d34", + "sha256:d5d33e9e7af3b34a40dc05f498939f0ebf187f07c385fd58d5= 91c533ad8562fe", + "sha256:fc0fea399acb12edbf8a628ba8d2312f583bdbdb3335635db0= 62fa98cf71fca4", + "sha256:fe460b922ec15dd205595c9b5b99e2f056fd98ae8f9f56b888= e7a17dc2b757e7" + ], + "markers": "implementation_name =3D=3D 'cpython' and python_ve= rsion < '3.8'", + "version": "=3D=3D1.4.1" + }, + "wrapt": { + "hashes": [ + "sha256:b62ffa81fb85f4332a4f609cab4ac40709470da05643a082ec= 1eb88e6d9b97d7" + ], + "version": "=3D=3D1.12.1" + } + } +} --=20 2.21.3 From nobody Thu May 16 23:31:05 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1591143573; cv=none; d=zohomail.com; s=zohoarc; b=fbzYTsNpctiz94M2jytPwZciVoi2uXDNR37mujZj62ZOQL9KDV7Q0794ihUZIH+UHR8Mv1jru/V+FWqQs31OPndrOHhHG5Xl6GK0OVam5pepPWzAHGHUTZyIZp1rxmvBJwPuFbSNPWp1KQcjl4Vj8RPaL4HcL70VdFfhIsRjPYc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591143573; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=583S2j3YMQKGNt/T0XBCDg5chZgehw0hbfqAp8GKu0s=; b=EfW93fVbZfOEFsQsy9o6DQHh/QWcnZL/LaHX75ar4XoI6LbjhpDTM14bPBoFne6kAPUPCkThDZxhKsWBYyBUruMrAkVM9Cthz4MzsGjtPvD5OLzeo96Dqba9mLtBrWwmCmt3+f8WcB1sK7guyMPxQW1DWxxfyC3FvGYmzF8gNeY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1591143573016662.7949773225996; Tue, 2 Jun 2020 17:19:33 -0700 (PDT) Received: from localhost ([::1]:48760 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jgH7z-0004Gx-Qp for importer@patchew.org; Tue, 02 Jun 2020 20:19:31 -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 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 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) 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= X-MC-Unique: NZDuckv0NhibQTYf1RFjbg-1 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 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=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=20Mathieu-Daud=C3=A9?= , Markus Armbruster , Max Reitz , John Snow , Stefan Hajnoczi , Cleber Rosa , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Vladimir Sementsov-Ogievskiy --- 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 =3D true =20 [dev-packages] pylint =3D "=3D=3D2.5.0" +flake8 =3D ">=3D3.6.0" =20 [packages] =20 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": "7815dedfd7481b645389153dd45e9adb82c72956d0efc74d8f0= 87497624b75e4" + "sha256": "30d00455625882e5e23868450487697f75d54474f6912091684= d570c5c518c11" }, "pipfile-spec": 6, "requires": { @@ -24,6 +24,22 @@ ], "version": "=3D=3D2.4.1" }, + "flake8": { + "hashes": [ + "sha256:c69ac1668e434d37a2d2880b3ca9aafd54b3a10a3ac1ab101d= 22f29e29cf8634", + "sha256:ccaa799ef9893cebe69fdfefed76865aeaefbb94cb8545617b= 2298786a4de9a5" + ], + "index": "pypi", + "version": "=3D=3D3.8.2" + }, + "importlib-metadata": { + "hashes": [ + "sha256:2a688cbaa90e0cc587f1df48bdc97a6eadccdcd9c35fb3f976= a09e3b5016d90f", + "sha256:34513a8a0c4962bc66d35b359558fd8a5e10cd472d37aec5f6= 6858addef32c1e" + ], + "markers": "python_version < '3.8'", + "version": "=3D=3D1.6.0" + }, "isort": { "hashes": [ "sha256:54da7e92468955c4fceacd0c86bd0ec997b0e1ee80d97f67c3= 5a78b719dccab1", @@ -64,6 +80,20 @@ ], "version": "=3D=3D0.6.1" }, + "pycodestyle": { + "hashes": [ + "sha256:2295e7b2f6b5bd100585ebcb1f616591b652db8a741695b3d8= f5d28bdc934367", + "sha256:c58a7d2815e0e8d7972bf1803331fb0152f867bd89adf8a01d= fd55085434192e" + ], + "version": "=3D=3D2.6.0" + }, + "pyflakes": { + "hashes": [ + "sha256:0d94e0e05a19e57a99444b6ddcf9a6eb2e5c68d3ca1e98e907= 07af8152c90a92", + "sha256:35b2d75ee967ea93b55750aa9edbbf72813e06a66ba54438df= 2cfac9e3c27fc8" + ], + "version": "=3D=3D2.2.0" + }, "pylint": { "hashes": [ "sha256:588e114e3f9a1630428c35b7dd1c82c1c93e1b0e78ee312ae4= 724c5e1a1e0245", @@ -118,6 +148,13 @@ "sha256:b62ffa81fb85f4332a4f609cab4ac40709470da05643a082ec= 1eb88e6d9b97d7" ], "version": "=3D=3D1.12.1" + }, + "zipp": { + "hashes": [ + "sha256:aa36550ff0c0b7ef7fa639055d797116ee891440eac1a56f37= 8e2d3179e0320b", + "sha256:c599e4d75c98f6798c509911d08a22e6c021d074469042177c= 8c86fb92eefd96" + ], + "version": "=3D=3D3.1.0" } } } --=20 2.21.3 From nobody Thu May 16 23:31:05 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1591143504; cv=none; d=zohomail.com; s=zohoarc; b=BCZ4Dq6ZNcaxIqyNah1GC5Spu/T8+fb3DbjcN1Dxqm3gDd3d2hg4yqIhEb87I0ffdH7LsvTaXf+e0QThedHknowi54/nLN0tOsmjk9S/c8iDYtjNo6QV3n6iiWhmdPqcdTDPx7K0BmhK2BK/hsRpMuLHakSX3VCTrWtwv8fIyUg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591143504; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=4sQ3/Uw6N4EwY5Jro8moBBBYDGmAFrlWPKnBcpuIYdQ=; b=eBtFWSLn8M5BJjux/B1xqUzh9E/qiAuKR0Xzcs2+CbczXJy6O829H2CUo7uKxqb3J7AWfgnChoxKJ1vvzQ02mpi/1qg7KG+pjlQWlVLv84dfhPoSnVY0+C4Uu2nfvPPJXA3FZnCdBG8etl7ijfJbRMsYmdecsMnyqiqGBiS6eEM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 159114350430367.89098187676802; Tue, 2 Jun 2020 17:18:24 -0700 (PDT) Received: from localhost ([::1]:44700 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jgH6t-0002Z5-3u for importer@patchew.org; Tue, 02 Jun 2020 20:18:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35168) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jgH4L-0007Lf-67 for qemu-devel@nongnu.org; Tue, 02 Jun 2020 20:15:45 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:46582 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 1jgH4K-0005mJ-0v for qemu-devel@nongnu.org; Tue, 02 Jun 2020 20:15:44 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-168-q2OZUSaiNQuplWLuRHaLIA-1; Tue, 02 Jun 2020 20:15:41 -0400 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 97188107ACCA; Wed, 3 Jun 2020 00:15:40 +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 16B1978B56; Wed, 3 Jun 2020 00:15:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591143343; 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=4sQ3/Uw6N4EwY5Jro8moBBBYDGmAFrlWPKnBcpuIYdQ=; b=DwlsJF3yZt5I9vjZ1uOGmYqQBDpQu6GyzSrvO0+yWFoeYMeKJIwg/QBAqnsmbxRi0La0DM s6q4oA9BajQfRx+JXpe2f6FOP3hNY5MUmWjxI/CtZkl3YuGVPEV5of/DwuL++hZ59WH+YH PGvPFieSSHakL35INzhi00kycU2yAY0= X-MC-Unique: q2OZUSaiNQuplWLuRHaLIA-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH 7/7] python/qemu: add mypy to pipenv Date: Tue, 2 Jun 2020 20:15:23 -0400 Message-Id: <20200603001523.18085-8-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 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=205.139.110.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 17:45: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_H4=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=20Mathieu-Daud=C3=A9?= , Markus Armbruster , Max Reitz , John Snow , Stefan Hajnoczi , Cleber Rosa , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" 0.730 appears to be about the oldest version that works with the features we want, including nice human readable output (to make sure iotest 297 passes), and type-parameterized Popen generics. Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy --- python/Pipfile | 1 + python/Pipfile.lock | 37 ++++++++++++++++++++++++++++++++++++- 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/python/Pipfile b/python/Pipfile index fc92038ff7a..117dd859c57 100644 --- a/python/Pipfile +++ b/python/Pipfile @@ -6,6 +6,7 @@ verify_ssl =3D true [dev-packages] pylint =3D "=3D=3D2.5.0" flake8 =3D ">=3D3.6.0" +mypy =3D ">=3D0.730" =20 [packages] =20 diff --git a/python/Pipfile.lock b/python/Pipfile.lock index 95b942bd383..fe2af682427 100644 --- a/python/Pipfile.lock +++ b/python/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "30d00455625882e5e23868450487697f75d54474f6912091684= d570c5c518c11" + "sha256": "773ac04fca007642cbe681368f20b74fea2d74443c14e16d221= cb2582344d7bd" }, "pipfile-spec": 6, "requires": { @@ -80,6 +80,33 @@ ], "version": "=3D=3D0.6.1" }, + "mypy": { + "hashes": [ + "sha256:15b948e1302682e3682f11f50208b726a246ab4e6c1b39f926= 4a8796bb416aa2", + "sha256:219a3116ecd015f8dca7b5d2c366c973509dfb9a8fc97ef044= a36e3da66144a1", + "sha256:3b1fc683fb204c6b4403a1ef23f0b1fac8e4477091585e0c8c= 54cbdf7d7bb164", + "sha256:3beff56b453b6ef94ecb2996bea101a08f1f8a9771d3cbf498= 8a61e4d9973761", + "sha256:7687f6455ec3ed7649d1ae574136835a4272b65b3ddcf01ab8= 704ac65616c5ce", + "sha256:7ec45a70d40ede1ec7ad7f95b3c94c9cf4c186a32f6bacb179= 5b60abd2f9ef27", + "sha256:86c857510a9b7c3104cf4cde1568f4921762c8f9842e987bc0= 3ed4f160925754", + "sha256:8a627507ef9b307b46a1fea9513d5c98680ba09591253082b4= c48697ba05a4ae", + "sha256:8dfb69fbf9f3aeed18afffb15e319ca7f8da9642336348ddd6= cab2713ddcf8f9", + "sha256:a34b577cdf6313bf24755f7a0e3f3c326d5c1f4fe7422d1d06= 498eb25ad0c600", + "sha256:a8ffcd53cb5dfc131850851cc09f1c44689c2812d0beb954d8= 138d4f5fc17f65", + "sha256:b90928f2d9eb2f33162405f32dde9f6dcead63a0971ca8a1b5= 0eb4ca3e35ceb8", + "sha256:c56ffe22faa2e51054c5f7a3bc70a370939c2ed4de308c690e= 7949230c995913", + "sha256:f91c7ae919bbc3f96cd5e5b2e786b2b108343d1d7972ea130f= 7de27fdd547cf3" + ], + "index": "pypi", + "version": "=3D=3D0.770" + }, + "mypy-extensions": { + "hashes": [ + "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a= 299250a846f15d", + "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5= 343488a6c604a8" + ], + "version": "=3D=3D0.4.3" + }, "pycodestyle": { "hashes": [ "sha256:2295e7b2f6b5bd100585ebcb1f616591b652db8a741695b3d8= f5d28bdc934367", @@ -143,6 +170,14 @@ "markers": "implementation_name =3D=3D 'cpython' and python_ve= rsion < '3.8'", "version": "=3D=3D1.4.1" }, + "typing-extensions": { + "hashes": [ + "sha256:6e95524d8a547a91e08f404ae485bbb71962de46967e1b71a0= cb89af24e761c5", + "sha256:79ee589a3caca649a9bfd2a8de4709837400dfa00b6cc81962= a1e6a1815969ae", + "sha256:f8d2bd89d25bc39dabe7d23df520442fa1d8969b82544370e0= 3d88b5a591c392" + ], + "version": "=3D=3D3.7.4.2" + }, "wrapt": { "hashes": [ "sha256:b62ffa81fb85f4332a4f609cab4ac40709470da05643a082ec= 1eb88e6d9b97d7" --=20 2.21.3