[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH 1/2] python/qemu: split QEMUMachine out from
From: |
John Snow |
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 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 |
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 <address@hidden>
>> ---
>> 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 <address@hidden>
>
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