From: John Snow <jsnow@redhat.com>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [RFC PATCH 1/2] python/qemu: split QEMUMachine out from underneath __init__.py
Date: Fri, 31 May 2019 15:43:14 -0400 [thread overview]
Message-ID: <d3c33175-e5d2-5ff2-f6bc-1d3daf11f951@redhat.com> (raw)
In-Reply-To: <20190531194022.GJ22103@habkost.net>
On 5/31/19 3:40 PM, Eduardo Habkost wrote:
> On Tue, May 28, 2019 at 04:42:19PM -0400, John Snow wrote:
>> It's not obvious that something named __init__.py actually houses
>> important code that isn't relevant to python packaging glue. Move the
>> QEMUMachine and related error classes out into their own module.
>>
>> Adjust users to the new import location.
>>
>> Signed-off-by: John Snow <jsnow@redhat.com>
>> ---
>> python/qemu/__init__.py | 502 +--------------------
>> python/qemu/machine.py | 520 ++++++++++++++++++++++
> I thought we could be lazy and add:
> from .machine import QEMUMachine
> to __init__.py.
>
> But if you decided to go the extra mile and change all
> QEMUMachine users to import qemu.machine, that's good too.
>
> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
>
I thought about it, but by analogy other callers know to import qmp
explicitly too, so I figured this was easiest in the long run.
--js
next prev parent reply other threads:[~2019-05-31 19:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-28 20:42 [Qemu-devel] [RFC PATCH 0/2] python: refactor qemu/__init__.py John Snow
2019-05-28 20:42 ` [Qemu-devel] [RFC PATCH 1/2] python/qemu: split QEMUMachine out from underneath __init__.py John Snow
2019-05-31 19:40 ` Eduardo Habkost
2019-05-31 19:43 ` John Snow [this message]
2019-05-28 20:42 ` [Qemu-devel] [RFC PATCH 2/2] machine.py: minor delinting John Snow
2019-05-29 5:18 ` Markus Armbruster
2019-05-29 12:54 ` John Snow
2019-05-29 13:15 ` Philippe Mathieu-Daudé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d3c33175-e5d2-5ff2-f6bc-1d3daf11f951@redhat.com \
--to=jsnow@redhat.com \
--cc=ehabkost@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.