[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v6 7/9] iotests: ignore import warnings from pylint

From: Philippe Mathieu-Daudé
Subject: Re: [PATCH v6 7/9] iotests: ignore import warnings from pylint
Date: Wed, 4 Mar 2020 01:02:58 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1

On 3/3/20 8:57 PM, John Snow wrote:
On 2/27/20 9:14 AM, Philippe Mathieu-Daudé wrote:
On 2/27/20 1:06 AM, John Snow wrote:
The right way to solve this is to come up with a virtual environment
infrastructure that sets all the paths correctly, and/or to create
installable python modules that can be imported normally.

That's hard, so just silence this error for now.

I'm tempted to NAck this and require an "installable python module"...

Let's discuss why it is that hard!

I've been tricked into this before. It's not work I am interested in
doing right now; it's WAY beyond the scope of what I am doing here.

It involves properly factoring all of our python code, deciding which
portions are meant to be installed separately from QEMU itself, coming
up with a versioning scheme, packaging code, and moving code around in
many places.

Then it involves coming up with tooling and infrastructure for creating
virtual environments, installing the right packages to it, and using it
to run our python tests.

No, that's way too invasive. I'm not doing it and I will scream loudly
if you make me.

A less invasive hack involves setting the python import path in a
consolidated spot so that python knows where it can import from. This
works, but might break the ability to run such tests as one-offs without
executing the environment setup.

Again, not work I care to do right now and so I won't. The benefit of
these patches is to provide some minimum viable CI CQA for Python where
we had none before, NOT fix every possible Python problem in one shot.

OK I guess we misunderstood each other :)

I didn't understood your comment as personal to you for this patch, but generic. It makes sense it is not your priority and it is obvious this task will take a single developer a lot of time resources. I am certainly NOT asking you to do it.

My question was rather community-oriented.
(Cc'ing Eduardo because we talked about this after the last KVM forum).


Signed-off-by: John Snow <address@hidden>
   tests/qemu-iotests/iotests.py | 1 +
   1 file changed, 1 insertion(+)

diff --git a/tests/qemu-iotests/iotests.py
index 60c4c7f736..214f59995e 100644
--- a/tests/qemu-iotests/iotests.py
+++ b/tests/qemu-iotests/iotests.py
@@ -30,6 +30,7 @@
   from collections import OrderedDict
   from typing import Collection
   +# pylint: disable=import-error, wrong-import-position
   sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..',
   from qemu import qtest

reply via email to

[Prev in Thread] Current Thread [Next in Thread]