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 <js...@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 <ehabk...@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

Reply via email to