Skip to content

python: move /scripts/qmp/gemu-ga-client.py to qemu.qmp package

John Snow qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest11 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11scripts/qemu-ga-client: apply isort rulesscripts/qmp/qemu-ga-client+5 -40 replies
2/11scripts/qemu-ga-client: apply (most) flake8 rulesscripts/qmp/qemu-ga-client+16 -120 replies
3/11scripts/qemu-ga-client: Fix exception handlingscripts/qmp/qemu-ga-client+4 -60 replies
4/11scripts/qemu-ga-client: replace deprecated optparse with argparsescripts/qmp/qemu-ga-client+15 -170 replies
5/11scripts/qemu-ga-client: add module docstringscripts/qmp/qemu-ga-client+33 -320 replies
6/11scripts/qemu-ga-client: apply (most) pylint rulesscripts/qmp/qemu-ga-client+15 -30 replies
7/11python/qmp: Correct type of QMPReturnValuepython/qemu/qmp/__init__.py+15 -100 replies
8/11scripts/qemu-ga-client: add mypy type hintsscripts/qmp/qemu-ga-client+49 -400 replies
9/11scripts/qemu-ga-client: move to python/qemu/qmp/qemu_ga_client.pypython/qemu/qmp/qemu_ga_client.py+0 -20 replies
10/11python/qemu-ga-client: add entry pointpython/qemu/qmp/qemu_ga_client.py python/setup.cfg+1 -20 replies
11/11scripts/qemu-ga-client: Add forwarder shimscripts/qmp/qemu-ga-client+11 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/11] python: move /scripts/qmp/gemu-ga-client.py to qemu.qmp package

Delint and type the qemu-ga-client and move it over into /python/qemu/qmp/qemu_ga_client.py.

Based-on: <[email protected]>
GitLab: https://gitlab.com/jsnow/qemu/-/commits/python-package-qga
CI: https://gitlab.com/jsnow/qemu/-/pipelines/315122004

(Weakly based on "[PATCH v3 00/19] Python: move /scripts/qmp/qom* to /python/qemu/qmp/qom*", for the purposes of avoiding context conflicts in /python/setup.cfg, but is trivially rebased without it.)

Add a new console entrypoint to the package under "qemu-ga-client", keeping the old name. (This makes a script named "qemu-ga-client" available in your $PATH when you use pip to install the qemu.qmp package.)

Add a forwarder shim back to /scripts/qmp/qemu-ga-client.py that forwards to the new script, keeping functionality as it was in the old location, at least for a little while. I intend to eventually deprecate these forwarders, but not yet. (This allows you to use "qemu-ga-client" from the scripts directory without needing to install the qemu.qmp package.)

Now this script is protected against regressions against the qemu.qmp package because it's part of it, and validated regularly by GitLab CI.

John Snow (11):
scripts/qemu-ga-client: apply isort rules scripts/qemu-ga-client: apply (most) flake8 rules scripts/qemu-ga-client: Fix exception handling scripts/qemu-ga-client: replace deprecated optparse with argparse scripts/qemu-ga-client: add module docstring scripts/qemu-ga-client: apply (most) pylint rules python/qmp: Correct type of QMPReturnValue scripts/qemu-ga-client: add mypy type hints scripts/qemu-ga-client: move to python/qemu/qmp/qemu_ga_client.py python/qemu-ga-client: add entry point scripts/qemu-ga-client: Add forwarder shim

 python/qemu/qmp/__init__.py       |  25 ++-
 python/qemu/qmp/qemu_ga_client.py | 323 ++++++++++++++++++++++++++++++
 python/setup.cfg                  |   1 +
 scripts/qmp/qemu-ga-client        | 297 +--------------------------
 4 files changed, 341 insertions(+), 305 deletions(-)
 create mode 100644 python/qemu/qmp/qemu_ga_client.py
Signature · 1 line
2.31.1