[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v7 09/31] python: create qemu packages
From: |
Cleber Rosa |
Subject: |
Re: [PATCH v7 09/31] python: create qemu packages |
Date: |
Thu, 27 May 2021 12:03:52 -0400 |
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 <jsnow@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 <crosa@redhat.com>
signature.asc
Description: PGP signature
- [PATCH v7 03/31] python/machine: use subprocess.run instead of subprocess.Popen, (continued)
- [PATCH v7 03/31] python/machine: use subprocess.run instead of subprocess.Popen, John Snow, 2021/05/25
- [PATCH v7 04/31] python/console_socket: Add a pylint ignore, John Snow, 2021/05/25
- [PATCH v7 06/31] python/machine: disable warning for Popen in _launch(), John Snow, 2021/05/25
- [PATCH v7 05/31] python/machine: Disable pylint warning for open() in _pre_launch, John Snow, 2021/05/25
- [PATCH v7 08/31] iotests/297: add --namespace-packages to mypy arguments, John Snow, 2021/05/25
- [PATCH v7 07/31] python/machine: Trim line length to below 80 chars, John Snow, 2021/05/25
- [PATCH v7 09/31] python: create qemu packages, John Snow, 2021/05/25
- [PATCH v7 13/31] python: add MANIFEST.in, John Snow, 2021/05/25
- [PATCH v7 12/31] python: add directory structure README.rst files, John Snow, 2021/05/25
- [PATCH v7 10/31] python: add qemu package installer, John Snow, 2021/05/25
- [PATCH v7 11/31] python: add VERSION file, John Snow, 2021/05/25
- [PATCH v7 15/31] python: add pylint import exceptions, John Snow, 2021/05/25
- [PATCH v7 16/31] python: move pylintrc into setup.cfg, John Snow, 2021/05/25