On Tue, May 25, 2021 at 08:24:32PM -0400, John Snow wrote: > move python/qemu/*.py to python/qemu/[machine, qmp, utils]/*.py and > update import directives across the tree. > > This is done to create a PEP420 namespace package, in which we may > create subpackages. To do this, the namespace directory ("qemu") should > not have any modules in it. Those files will go into new 'machine', > 'qmp' and 'utils' subpackages instead. > > Implement machine/__init__.py making the top-level classes and functions > from its various modules available directly inside the package. Change > qmp.py to qmp/__init__.py similarly, such that all of the useful QMP > library classes are available directly from "qemu.qmp" instead of > "qemu.qmp.qmp". > > Signed-off-by: John Snow <js...@redhat.com> > --- > python/{qemu => }/.isort.cfg | 0 > python/qemu/__init__.py | 11 ------- > python/qemu/{ => machine}/.flake8 | 0 > python/qemu/machine/__init__.py | 33 +++++++++++++++++++++ > python/qemu/{ => machine}/console_socket.py | 0 > python/qemu/{ => machine}/machine.py | 16 ++++++---- > python/qemu/{ => machine}/pylintrc | 0 > python/qemu/{ => machine}/qtest.py | 3 +- > python/qemu/{qmp.py => qmp/__init__.py} | 12 +++++++- > python/qemu/{utils.py => utils/__init__.py} | 18 +++++++++-- > python/qemu/{ => utils}/accel.py | 0 > tests/acceptance/avocado_qemu/__init__.py | 9 +++--- > tests/acceptance/virtio-gpu.py | 2 +- > tests/qemu-iotests/300 | 4 +-- > tests/qemu-iotests/iotests.py | 2 +- > tests/vm/aarch64vm.py | 2 +- > tests/vm/basevm.py | 3 +- > 17 files changed, 83 insertions(+), 32 deletions(-) > rename python/{qemu => }/.isort.cfg (100%) > delete mode 100644 python/qemu/__init__.py > rename python/qemu/{ => machine}/.flake8 (100%) > create mode 100644 python/qemu/machine/__init__.py > rename python/qemu/{ => machine}/console_socket.py (100%) > rename python/qemu/{ => machine}/machine.py (98%) > rename python/qemu/{ => machine}/pylintrc (100%) > rename python/qemu/{ => machine}/qtest.py (99%) > rename python/qemu/{qmp.py => qmp/__init__.py} (96%) > rename python/qemu/{utils.py => utils/__init__.py} (66%) > rename python/qemu/{ => utils}/accel.py (100%) >
Reviewed-by: Cleber Rosa <cr...@redhat.com>
signature.asc
Description: PGP signature