All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 00/19] Python: move /scripts/qmp/qom* to /python/qemu/qmp/qom*
@ 2021-06-03  0:37 John Snow
  2021-06-03  0:37 ` [PATCH v3 01/19] python/pipenv: Update Pipfile.lock John Snow
                   ` (19 more replies)
  0 siblings, 20 replies; 25+ messages in thread
From: John Snow @ 2021-06-03  0:37 UTC (permalink / raw)
  To: qemu-devel
  Cc: Markus Armbruster, John Snow, Niteesh G . S .,
	Eduardo Habkost, Cleber Rosa

Closes: https://gitlab.com/qemu-project/qemu/-/issues/202
GitLab: https://gitlab.com/jsnow/qemu/-/commits/python-package-qom
CI: https://gitlab.com/jsnow/qemu/-/pipelines/313932818

Hello!
------

This series applies the usual linting cleanups to modernize the qom
tools and then integrates them into the python packaging hierarchy.

This will help prevent further bitrot of these tools.

I don't expect or need a detailed review of the QOM tools themselves --
these tools are not used during build OR testing, and some are fairly
bitrotted in places.

However, some details of how the python packaging system is being
utilized here may attract your attention and could be worth a look.
(Patches 5-6 and 16-19 are the interesting ones.)

Since these scripts aren't critical, I'm OK with sending a fairly hasty
PR to merge these sooner rather than later.

Overview:
---------

Patch 1: Update Pipfile.lock (See the commit as for why ...)

Patches 2-3: Correct some existing typing issues in qemu.qmp

Patch 4: Combine qom-set, qom-get, (etc) into one, newly written script
that makes all of the command invocations, help text, etc. consistent.
(I ask that review for this patch should be limited to critical
mistakes: I have no interest in developing the QOM tools further.)

Patches 5-6: Integrate the qom tools into the python package.

Patches 7-15: Delinting of the qom_fuse script. Similarly, I am not
terribly interested in further improvements here, personally.

Patches 16-19: Integrating qom-fuse into the Python packaging directory;
additional care is taken to ensure that "optional" dependencies like
fusepy are handled well.

Changelog
---------

V3:
- Technically, I sent two versions of this before, a long time ago.
  This has been cleaned up and based on the latest origin/master.

John Snow (19):
  python/pipenv: Update Pipfile.lock
  python/qmp: Fix type of SocketAddrT
  python/qmp: add parse_address classmethod
  python/qmp: Add qom script rewrites
  python/qmp: add qom script entry points
  scripts/qmp: redirect qom-xxx scripts to python/qemu/qmp/
  scripts/qom-fuse: apply isort rules
  scripts/qom-fuse: apply flake8 rules
  python: Add 'fh' to known-good variable names
  scripts/qom-fuse: Apply pylint rules
  scripts/qom-fuse: Add docstrings
  scripts/qom-fuse: Convert to QOMCommand
  scripts/qom-fuse: use QOMCommand.qom_list()
  scripts/qom-fuse: ensure QOMFuse.read always returns bytes
  scripts/qom-fuse: add static type hints
  python: add optional FUSE dependencies
  scripts/qom-fuse: move to python/qemu/qmp/qom_fuse.py
  scripts/qom-fuse: add redirection shim to python/qemu/qmp/qom-fuse.py
  python/qmp: add fuse command to 'qom' tools

 python/Pipfile.lock           |  97 +++++++++++-
 python/qemu/qmp/__init__.py   |  28 +++-
 python/qemu/qmp/qom.py        | 272 ++++++++++++++++++++++++++++++++++
 python/qemu/qmp/qom_common.py | 178 ++++++++++++++++++++++
 python/qemu/qmp/qom_fuse.py   | 206 +++++++++++++++++++++++++
 python/setup.cfg              |  33 ++++-
 scripts/qmp/qmp-shell         |  21 +--
 scripts/qmp/qom-fuse          | 144 +-----------------
 scripts/qmp/qom-get           |  66 +--------
 scripts/qmp/qom-list          |  63 +-------
 scripts/qmp/qom-set           |  63 +-------
 scripts/qmp/qom-tree          |  74 +--------
 12 files changed, 828 insertions(+), 417 deletions(-)
 create mode 100644 python/qemu/qmp/qom.py
 create mode 100644 python/qemu/qmp/qom_common.py
 create mode 100644 python/qemu/qmp/qom_fuse.py

-- 
2.31.1




^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2021-06-09 20:33 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-03  0:37 [PATCH v3 00/19] Python: move /scripts/qmp/qom* to /python/qemu/qmp/qom* John Snow
2021-06-03  0:37 ` [PATCH v3 01/19] python/pipenv: Update Pipfile.lock John Snow
2021-06-03  0:37 ` [PATCH v3 02/19] python/qmp: Fix type of SocketAddrT John Snow
2021-06-03  7:07   ` Philippe Mathieu-Daudé
2021-06-03  0:37 ` [PATCH v3 03/19] python/qmp: add parse_address classmethod John Snow
2021-06-03  0:37 ` [PATCH v3 04/19] python/qmp: Add qom script rewrites John Snow
2021-06-03  0:37 ` [PATCH v3 05/19] python/qmp: add qom script entry points John Snow
2021-06-03  0:37 ` [PATCH v3 06/19] scripts/qmp: redirect qom-xxx scripts to python/qemu/qmp/ John Snow
2021-06-03  0:37 ` [PATCH v3 07/19] scripts/qom-fuse: apply isort rules John Snow
2021-06-03  0:37 ` [PATCH v3 08/19] scripts/qom-fuse: apply flake8 rules John Snow
2021-06-03  7:08   ` Philippe Mathieu-Daudé
2021-06-03  0:37 ` [PATCH v3 09/19] python: Add 'fh' to known-good variable names John Snow
2021-06-03  0:37 ` [PATCH v3 10/19] scripts/qom-fuse: Apply pylint rules John Snow
2021-06-03  0:37 ` [PATCH v3 11/19] scripts/qom-fuse: Add docstrings John Snow
2021-06-03  0:37 ` [PATCH v3 12/19] scripts/qom-fuse: Convert to QOMCommand John Snow
2021-06-03  0:37 ` [PATCH v3 13/19] scripts/qom-fuse: use QOMCommand.qom_list() John Snow
2021-06-03  7:09   ` Philippe Mathieu-Daudé
2021-06-03  0:37 ` [PATCH v3 14/19] scripts/qom-fuse: ensure QOMFuse.read always returns bytes John Snow
2021-06-03  0:37 ` [PATCH v3 15/19] scripts/qom-fuse: add static type hints John Snow
2021-06-03  0:37 ` [PATCH v3 16/19] python: add optional FUSE dependencies John Snow
2021-06-03  0:37 ` [PATCH v3 17/19] scripts/qom-fuse: move to python/qemu/qmp/qom_fuse.py John Snow
2021-06-03  0:37 ` [PATCH v3 18/19] scripts/qom-fuse: add redirection shim to python/qemu/qmp/qom-fuse.py John Snow
2021-06-03  0:37 ` [PATCH v3 19/19] python/qmp: add fuse command to 'qom' tools John Snow
2021-06-03  7:11   ` Philippe Mathieu-Daudé
2021-06-09 20:32 ` [PATCH v3 00/19] Python: move /scripts/qmp/qom* to /python/qemu/qmp/qom* John Snow

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.