qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 9d0ead: python/pipenv: Update Pipfile.lock


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 9d0ead: python/pipenv: Update Pipfile.lock
Date: Mon, 21 Jun 2021 12:43:19 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 9d0ead63bf6b89ae7170dc4238a1ddc6b8188d14
      
https://github.com/qemu/qemu/commit/9d0ead63bf6b89ae7170dc4238a1ddc6b8188d14
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M python/Pipfile.lock

  Log Message:
  -----------
  python/pipenv: Update Pipfile.lock

In a previous commit, I added tox to the development requirements of the
Python library. I never bothered to add them to the Pipfile, because
they aren't needed there. Here, I sync it anyway in its own commit so
that when we add new packages later that the diffstats will not
confusingly appear to pull in lots of extra packages.

Ideally I could tell Pipenv simply not to install these, but it doesn't
seem to support that, exactly. The alternative is removing Tox from the
development requires, which I'd rather not do.

The other alternative is re-specifying all of the dependencies of
setup.cfg in the Pipfile, which I'd also rather not do.

Picking what feels least-worst here.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210603003719.1321369-2-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: 5d15c9b875d2102143835ac989954a59a53d2b20
      
https://github.com/qemu/qemu/commit/5d15c9b875d2102143835ac989954a59a53d2b20
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M python/qemu/qmp/__init__.py

  Log Message:
  -----------
  python/qmp: Fix type of SocketAddrT

In porting the qom tools, qmp-shell, etc; it becomes evident that this
type is wrong.

This is an integer, not a string. We didn't catch this before because
none of QEMUMonitorProtocol's *users* happen to be checked, and the
internal logic of this class is otherwise self-consistent. Additionally,
mypy was not introspecting into the socket() interface to realize we
were passing a bad type for AF_INET. Fixed now.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20210603003719.1321369-3-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: 587adaca55e825412e54cbc9f9f20e86a6d68a72
      
https://github.com/qemu/qemu/commit/587adaca55e825412e54cbc9f9f20e86a6d68a72
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M python/qemu/qmp/__init__.py
    M scripts/qmp/qmp-shell

  Log Message:
  -----------
  python/qmp: add parse_address classmethod

This takes the place of qmp-shell's __get_address function. It also
allows other utilities to share the same parser and syntax for
specifying QMP locations.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210603003719.1321369-4-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: c750c02891a81f07c6c90735432306bea79fac4b
      
https://github.com/qemu/qemu/commit/c750c02891a81f07c6c90735432306bea79fac4b
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    A python/qemu/qmp/qom.py
    A python/qemu/qmp/qom_common.py

  Log Message:
  -----------
  python/qmp: Add qom script rewrites

Inspired by qom-set, qom-get, qom-tree and qom-list; combine all four of
those scripts into a single script.

A later addition of qom-fuse as an 'extension' necessitates that some
common features are split out and shared between them.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210603003719.1321369-5-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: 7c4c595f13fa9bb19d8b6a1ed328aab5469c063a
      
https://github.com/qemu/qemu/commit/7c4c595f13fa9bb19d8b6a1ed328aab5469c063a
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M python/setup.cfg

  Log Message:
  -----------
  python/qmp: add qom script entry points

Add the 'qom', 'qom-set', 'qom-get', 'qom-list', and 'qom-tree' scripts
to the qemu.qmp package. When you install this package, these scripts
will become available on your command line.

(e.g. when inside of a venv, `cd python && pip install .` will add
'qom', 'qom-set', etc to your $PATH.)

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20210603003719.1321369-6-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: 908ff4b29f6ff8a990cc7e895feb4ebf9cf6d2c9
      
https://github.com/qemu/qemu/commit/908ff4b29f6ff8a990cc7e895feb4ebf9cf6d2c9
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M scripts/qmp/qom-get
    M scripts/qmp/qom-list
    M scripts/qmp/qom-set
    M scripts/qmp/qom-tree

  Log Message:
  -----------
  scripts/qmp: redirect qom-xxx scripts to python/qemu/qmp/

Redirect to the new qom scripts. These forwarders can be deleted
eventually when there has been more time for the dust on the Python
packaging to settle and people understand how to find these commands.

Note: You can run these by setting $PYTHONPATH in your shell and then
running "python3 -m qemu.qmp.qom", or you can install the qemu namespace
package and use the "qom" or "qom-set" scripts.

I've written how to install the package elsewhere, but for the sake of
git-blame, cd to ./python, and then do:

- pip3 install [--user] [-e] .

--user will install to your local user install (will not work inside of
  a venv), omitting this flag installs to your system-wide packages
  (outside of a venv) or to your current virtual environment (inside the
  venv).

  When installing to a venv or to your system-wide packages, "qom"
  should be in your $PATH already. If you do a user install, you may
  need to add ~/.local/bin to your $PATH if you haven't already.

-e installs in editable mode: the installed package is effectively just
 a symlink to this folder; so changes to your git working tree are
 reflected in the installed package.

Note: installing these packages to an environment outside a venv can be
dangerous: Many QEMU scripts will begin to prefer the installed version
instead of the version directly in the tree. Use with caution. editable
mode is recommended when working outside of a venv.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20210603003719.1321369-7-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: c6b7eae9b6743f017067ece3830dd8563b2350a9
      
https://github.com/qemu/qemu/commit/c6b7eae9b6743f017067ece3830dd8563b2350a9
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M scripts/qmp/qom-fuse

  Log Message:
  -----------
  scripts/qom-fuse: apply isort rules

Hint: you can use symlinks to create qom_fuse.py in python/qemu/qmp/ and
point to scripts/qom-fuse to apply the standard linting rules to this
script.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20210603003719.1321369-8-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: 26c1ccadc41bf32a720faf4d652eae41c7e54d00
      
https://github.com/qemu/qemu/commit/26c1ccadc41bf32a720faf4d652eae41c7e54d00
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M scripts/qmp/qom-fuse

  Log Message:
  -----------
  scripts/qom-fuse: apply flake8 rules

flake8 still has one warning because of the sys.path hack, but that will
be going away by the end of this patch series.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20210603003719.1321369-9-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: d229f1c83d698ed5f605bcc2eab96e05afeddefb
      
https://github.com/qemu/qemu/commit/d229f1c83d698ed5f605bcc2eab96e05afeddefb
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M python/setup.cfg

  Log Message:
  -----------
  python: Add 'fh' to known-good variable names

fd and fh are fine: we often use these for "file descriptor" or "file
handle" accordingly. It is rarely the case that you need to enforce a
more semantically meaningful name beyond "This is the file we are using
right now."

While we're here: add comments for all of the non-standard pylint
names. (And the underscore.)

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210603003719.1321369-10-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: 7552823a36d3b99598ec53431ff43774ce11e6f2
      
https://github.com/qemu/qemu/commit/7552823a36d3b99598ec53431ff43774ce11e6f2
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M scripts/qmp/qom-fuse

  Log Message:
  -----------
  scripts/qom-fuse: Apply pylint rules

- Catch specific exceptions from QMP
- Reraise errors with explicit context
- method parameters should match parent's names

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20210603003719.1321369-11-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: 187be27c7bc66afaf8c90c3b8c302a55c8f9f7d6
      
https://github.com/qemu/qemu/commit/187be27c7bc66afaf8c90c3b8c302a55c8f9f7d6
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M scripts/qmp/qom-fuse

  Log Message:
  -----------
  scripts/qom-fuse: Add docstrings

The methods inherited from fuse don't need docstrings; that's up to
fusepy to handle.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210603003719.1321369-12-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: 2aa101799acf45fd5e4207fbec95d2ee9507bc54
      
https://github.com/qemu/qemu/commit/2aa101799acf45fd5e4207fbec95d2ee9507bc54
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M scripts/qmp/qom-fuse

  Log Message:
  -----------
  scripts/qom-fuse: Convert to QOMCommand

Move qom-fuse onto the QOMCommand base established in
python/qemu/qmp/qom_common.py. The interface doesn't change
incompatibly, "qom-fuse mountpoint" still works as an invocation, and
QMP_SOCKET is still used as the environment variable.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210603003719.1321369-13-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: 9ec8a3869480a9826ba77b480bb7ca567aa3d26b
      
https://github.com/qemu/qemu/commit/9ec8a3869480a9826ba77b480bb7ca567aa3d26b
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M scripts/qmp/qom-fuse

  Log Message:
  -----------
  scripts/qom-fuse: use QOMCommand.qom_list()

the qom_list method provides a type-safe object that's easier to type
check, so switch to using it.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20210603003719.1321369-14-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: 2cea7134620749b106af167322d921716ef61144
      
https://github.com/qemu/qemu/commit/2cea7134620749b106af167322d921716ef61144
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M scripts/qmp/qom-fuse

  Log Message:
  -----------
  scripts/qom-fuse: ensure QOMFuse.read always returns bytes

- Use FuseOSError to signal ENOENT instead of returning it
- Wrap qom-get in str(), as we don't always know its type
- The empty return should be b'', not ''.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20210603003719.1321369-15-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: 30ec845c599acc0616a57811316bc506a08344f2
      
https://github.com/qemu/qemu/commit/30ec845c599acc0616a57811316bc506a08344f2
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M python/setup.cfg
    M scripts/qmp/qom-fuse

  Log Message:
  -----------
  scripts/qom-fuse: add static type hints

Because fusepy does not have type hints, add some targeted warning
suppressions.

Namely, we need to allow subclassing something of an unknown type (in
qom_fuse.py), and we need to allow missing imports (recorded against
fuse itself) because mypy will be unable to import fusepy (even when
installed) as it has no types nor type stubs available.

Note: Until now, it was possible to run invocations like 'mypy qemu/'
from ./python and have that work. However, these targeted suppressions
require that you run 'mypy -p qemu/' instead. The correct, canonical
invocation is recorded in ./python/tests/mypy.sh and all of the various
CI invocations always use this correct form.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210603003719.1321369-16-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: c63f3b0b29f8320e77a83acd9d055e6607f02f85
      
https://github.com/qemu/qemu/commit/c63f3b0b29f8320e77a83acd9d055e6607f02f85
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M python/Pipfile.lock
    M python/setup.cfg

  Log Message:
  -----------
  python: add optional FUSE dependencies

In preparation for moving qom-fuse over to the python package, we need
some new dependencies to support it.

Add an optional 'fusepy' dependency that users of the package can opt
into with e.g. "pip install qemu[fuse]" which installs the requirements
necessary to obtain the additional functionality.

Add the same fusepy dependency to the 'devel' extras group --
unfortunately I do not see a way for optional groups to imply other
optional groups at present, so the dependency is repeated. The
development group needs to include the full set of dependencies for the
purpose of static analysis of all features offered by this library.

Lastly, add the [fuse] extras group to tox's configuration as a
workaround so that if a stale tox environment is found when running
`make check-tox`, tox will know to rebuild its environments.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210603003719.1321369-17-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: 173d185de98c4ee358e5615cedcd8773719586c0
      
https://github.com/qemu/qemu/commit/173d185de98c4ee358e5615cedcd8773719586c0
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    A python/qemu/qmp/qom_fuse.py
    R scripts/qmp/qom-fuse

  Log Message:
  -----------
  scripts/qom-fuse: move to python/qemu/qmp/qom_fuse.py

Move qom-fuse over to the python package now that it passes the
linter. Update the import paradigms so that it continues to pass in the
context of the Python package.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210603003719.1321369-18-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: c89b38cd0a9ec852ed5504b3083ca7592d76b730
      
https://github.com/qemu/qemu/commit/c89b38cd0a9ec852ed5504b3083ca7592d76b730
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    A scripts/qmp/qom-fuse

  Log Message:
  -----------
  scripts/qom-fuse: add redirection shim to python/qemu/qmp/qom-fuse.py

By leaving the script absent for a commit, git-blame travels to the new
file instead of staying on the shim.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20210603003719.1321369-19-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: 176c5490724b813704bd5b083b9f5c9b857fdaad
      
https://github.com/qemu/qemu/commit/176c5490724b813704bd5b083b9f5c9b857fdaad
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M python/qemu/qmp/qom.py
    M python/setup.cfg

  Log Message:
  -----------
  python/qmp: add fuse command to 'qom' tools

The 'fuse' command will be unavailable if 'fusepy' is not installed. It
will simply not load and subsequently be unavailable as a subcommand.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20210603003719.1321369-20-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: 9510e4fb6967c39871b149676e09bb7ee875bc18
      
https://github.com/qemu/qemu/commit/9510e4fb6967c39871b149676e09bb7ee875bc18
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M scripts/qmp/qemu-ga-client

  Log Message:
  -----------
  scripts/qemu-ga-client: apply isort rules

Hint:
> ln -s scripts/qmp/qemu-ga-client python/qemu/qmp/qemu_ga_client.py
> cd python
> isort qemu

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210604155532.1499282-2-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: e75f516ac131dbc3c82ac52ef527680c4745add3
      
https://github.com/qemu/qemu/commit/e75f516ac131dbc3c82ac52ef527680c4745add3
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M scripts/qmp/qemu-ga-client

  Log Message:
  -----------
  scripts/qemu-ga-client: apply (most) flake8 rules

- Line length should be < 80
- You shouldn't perform unscoped imports except at the top of the module

Notably, the sys.path hack creates problems with the import rule. This
will be fixed later.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210604155532.1499282-3-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: e6de9ce90a67960a6477da5a5c69c19ce390ed1d
      
https://github.com/qemu/qemu/commit/e6de9ce90a67960a6477da5a5c69c19ce390ed1d
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M scripts/qmp/qemu-ga-client

  Log Message:
  -----------
  scripts/qemu-ga-client: Fix exception handling

Fixes: 50d189c

These error classes aren't available anymore. Fix the bitrot.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210604155532.1499282-4-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: 0cf1a52d289d69461df0d984aa50ec61f8a21c30
      
https://github.com/qemu/qemu/commit/0cf1a52d289d69461df0d984aa50ec61f8a21c30
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M scripts/qmp/qemu-ga-client

  Log Message:
  -----------
  scripts/qemu-ga-client: replace deprecated optparse with argparse

optparse isn't supported anymore, it's from the python2 days. Replace it
with the mostly similar argparse.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210604155532.1499282-5-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: aff103b531dc6e44650e5d3d983f313700cb7534
      
https://github.com/qemu/qemu/commit/aff103b531dc6e44650e5d3d983f313700cb7534
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M scripts/qmp/qemu-ga-client

  Log Message:
  -----------
  scripts/qemu-ga-client: add module docstring

Turn that nice usage comment into a docstring.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210604155532.1499282-6-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: f85d3252ef889b102eb42756450f45c973d3cb43
      
https://github.com/qemu/qemu/commit/f85d3252ef889b102eb42756450f45c973d3cb43
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M scripts/qmp/qemu-ga-client

  Log Message:
  -----------
  scripts/qemu-ga-client: apply (most) pylint rules

I'm only doing a very quick best-effort to preserve this script, to help
keep it from breaking further. I think there are pending ideas swirling
on the right way to implement better SDKs and better clients, and this
script might be a handy reference for those discussions. It presents
some interesting design problems, like static type safety when using a
dynamic RPC mechanism.

I believe it's worth preserving the effort and care that went into
making this script by updating it to work with our current
infrastructure. However, I am disabling the requirement for docstrings
in this file.

If you would like to help improve this script, please add docstrings
alongside any refactors or rejuvenations you might apply at that time.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210604155532.1499282-7-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: 1f6399393bc672c2b89c3c3b862ff96baecc1bef
      
https://github.com/qemu/qemu/commit/1f6399393bc672c2b89c3c3b862ff96baecc1bef
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M python/qemu/qmp/__init__.py

  Log Message:
  -----------
  python/qmp: Correct type of QMPReturnValue

It's only a Dict[str, Any] most of the time. It's not actually
guaranteed to be anything in particular. Fix this type to be
more accurate to the reality we live in.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210604155532.1499282-8-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: ca683d4a2fece0e6bf58f065baa1e23226c1ac06
      
https://github.com/qemu/qemu/commit/ca683d4a2fece0e6bf58f065baa1e23226c1ac06
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M scripts/qmp/qemu-ga-client

  Log Message:
  -----------
  scripts/qemu-ga-client: add mypy type hints

This script is in slightly rough shape, but it still works. A lot of
care went into its initial development. In good faith, I'm updating it
to the latest Python coding standards. If there is in interest in this
script, though, I'll be asking for a contributor to take care of it
further.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210604155532.1499282-9-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: 1e129afc311a4a3897e83a308cce79e2c1cc3d89
      
https://github.com/qemu/qemu/commit/1e129afc311a4a3897e83a308cce79e2c1cc3d89
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    A python/qemu/qmp/qemu_ga_client.py
    R scripts/qmp/qemu-ga-client

  Log Message:
  -----------
  scripts/qemu-ga-client: move to python/qemu/qmp/qemu_ga_client.py

The script itself will be unavailable for a few commits before being
restored, with no way to run it right after this commit. This helps move
git history into the new file. To prevent linter regressions, though, we
do need to immediately touch up the filename to remove dashes (to make
the module importable), and remove the executable bit.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210604155532.1499282-10-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: 7e7c2a0de74d56c3f47205df3dcf68ed7d43d30d
      
https://github.com/qemu/qemu/commit/7e7c2a0de74d56c3f47205df3dcf68ed7d43d30d
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M python/qemu/qmp/qemu_ga_client.py
    M python/setup.cfg

  Log Message:
  -----------
  python/qemu-ga-client: add entry point

Remove the shebang, and add a package-defined entry point instead. Now,
it can be accessed using 'qemu-ga-client' from the command line after
installing the package.

The next commit adds a forwarder shim that allows the running of this
script without needing to install the package again.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210604155532.1499282-11-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: 88fb483fc559e297ee681e161d70c4615b2a28ea
      
https://github.com/qemu/qemu/commit/88fb483fc559e297ee681e161d70c4615b2a28ea
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    A scripts/qmp/qemu-ga-client

  Log Message:
  -----------
  scripts/qemu-ga-client: Add forwarder shim

Add a little forwarder shim until we are sure that everyone is
comfortable with how to use the tools in their new packaged location.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210604155532.1499282-12-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: badf462985eb55a8f589d983ee65542972d16d3e
      
https://github.com/qemu/qemu/commit/badf462985eb55a8f589d983ee65542972d16d3e
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M scripts/qmp/qmp-shell

  Log Message:
  -----------
  scripts/qmp-shell: apply isort rules

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210607200649.1840382-2-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: 169b43b367b874076c544984fc3e63e3c5c49763
      
https://github.com/qemu/qemu/commit/169b43b367b874076c544984fc3e63e3c5c49763
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M scripts/qmp/qmp-shell

  Log Message:
  -----------
  scripts/qmp-shell: Apply flake8 rules

A lot of fiddling around to get us below 80 columns.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210607200649.1840382-3-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: 70e56740181a980a5bb60c3b0223e34e2616caf4
      
https://github.com/qemu/qemu/commit/70e56740181a980a5bb60c3b0223e34e2616caf4
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M scripts/qmp/qmp-shell

  Log Message:
  -----------
  scripts/qmp-shell: fix show_banner signature

The signatures need to match.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210607200649.1840382-4-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: de14ba24f3f31329debdfac9fa73c8d78e30399b
      
https://github.com/qemu/qemu/commit/de14ba24f3f31329debdfac9fa73c8d78e30399b
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M scripts/qmp/qmp-shell

  Log Message:
  -----------
  scripts/qmp-shell: fix exception handling

Fixes: 50d189c

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210607200649.1840382-5-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: f2daa2d489d7b4f94288d6fafb8072fb1ea384a9
      
https://github.com/qemu/qemu/commit/f2daa2d489d7b4f94288d6fafb8072fb1ea384a9
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M scripts/qmp/qmp-shell

  Log Message:
  -----------
  scripts/qmp-shell: fix connect method signature

It needs to match the parent's signature -- the negotiate parameter must
be optional.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210607200649.1840382-6-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: 9669c8289c8f16eb97ac887ab09598925f4712ce
      
https://github.com/qemu/qemu/commit/9669c8289c8f16eb97ac887ab09598925f4712ce
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M scripts/qmp/qmp-shell

  Log Message:
  -----------
  scripts/qmp-shell: remove shadowed variable from _print()

Don't use 'qmp' here, which shadows the qmp module.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210607200649.1840382-7-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: c4a1447fc13fd71df3813bfd451b98137f12b434
      
https://github.com/qemu/qemu/commit/c4a1447fc13fd71df3813bfd451b98137f12b434
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M scripts/qmp/qmp-shell

  Log Message:
  -----------
  scripts/qmp-shell: use @classmethod where appropriate

Methods with no self-use should belong to the class.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210607200649.1840382-8-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: 5cb0233861750908f5942ffb36061442e84c86da
      
https://github.com/qemu/qemu/commit/5cb0233861750908f5942ffb36061442e84c86da
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M scripts/qmp/qmp-shell

  Log Message:
  -----------
  scripts/qmp-shell: Use python3-style super()

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210607200649.1840382-9-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: 31226369ab9fa654cdb37d977c5f396367065019
      
https://github.com/qemu/qemu/commit/31226369ab9fa654cdb37d977c5f396367065019
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M scripts/qmp/qmp-shell

  Log Message:
  -----------
  scripts/qmp-shell: declare verbose in __init__

Linters get angry when we don't define state at init time.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210607200649.1840382-10-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: c6be2bf86eb93a2e6afc4a6818310303471b3212
      
https://github.com/qemu/qemu/commit/c6be2bf86eb93a2e6afc4a6818310303471b3212
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M scripts/qmp/qmp-shell

  Log Message:
  -----------
  scripts/qmp-shell: use triple-double-quote docstring style

(2014 me had never written python before.)

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210607200649.1840382-11-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: 50f6f1c3081322a1d9e2d0bbe5c9f434d712cf50
      
https://github.com/qemu/qemu/commit/50f6f1c3081322a1d9e2d0bbe5c9f434d712cf50
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M scripts/qmp/qmp-shell

  Log Message:
  -----------
  scripts/qmp-shell: ignore visit_Name name

Not something I control, sorry, pylint.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210607200649.1840382-12-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: 2813dee0536c1b5d114c0fa0bdeb25317a38f486
      
https://github.com/qemu/qemu/commit/2813dee0536c1b5d114c0fa0bdeb25317a38f486
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M scripts/qmp/qmp-shell

  Log Message:
  -----------
  scripts/qmp-shell: make QMPCompleter returns explicit

This function returns None when it doesn't find a match; do that
explicitly.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210607200649.1840382-13-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: 628b92dd67a262ebeac12dba65905c8143ce710f
      
https://github.com/qemu/qemu/commit/628b92dd67a262ebeac12dba65905c8143ce710f
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M scripts/qmp/qmp-shell

  Log Message:
  -----------
  scripts/qmp-shell: rename one and two-letter variables

A bit of churn and housekeeping for pylint, flake8 et al.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210607200649.1840382-14-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: d962ec85ed188b04f35a28771c69845f09a3867e
      
https://github.com/qemu/qemu/commit/d962ec85ed188b04f35a28771c69845f09a3867e
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M scripts/qmp/qmp-shell

  Log Message:
  -----------
  scripts/qmp-shell: fix shell history exception handling

We want to remove exceptions that are too broad here; we only want to
catch IOErrors that get raised as a direct result of the open call.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210607200649.1840382-15-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: 73f699c903d429dfcd3b43232155cd515a854e80
      
https://github.com/qemu/qemu/commit/73f699c903d429dfcd3b43232155cd515a854e80
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M scripts/qmp/qmp-shell

  Log Message:
  -----------
  scripts/qmp-shell: remove if-raise-else patterns

Shushes pylint. I don't always mind these patterns personally, but I'm
not as sure that I want to remove the warning from pylint's repertoire
entirely. Oh well.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210607200649.1840382-16-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: 90bd8eb8dcdc94da964786ddedd90c30eb54ada7
      
https://github.com/qemu/qemu/commit/90bd8eb8dcdc94da964786ddedd90c30eb54ada7
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M scripts/qmp/qmp-shell

  Log Message:
  -----------
  scripts/qmp-shell: use isinstance() instead of type()

A bit more idiomatic, and quiets some linter warnings.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210607200649.1840382-17-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: 17329be2fd1557c3e1e30ce3d0f714fc70c4e5be
      
https://github.com/qemu/qemu/commit/17329be2fd1557c3e1e30ce3d0f714fc70c4e5be
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M scripts/qmp/qmp-shell

  Log Message:
  -----------
  scripts/qmp-shell: use argparse

Use argparse instead of an open-coded CLI parser, for consistency with
everything else.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210607200649.1840382-18-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: ad459132c088dc9b33e86b8ad87f96742e4de4bf
      
https://github.com/qemu/qemu/commit/ad459132c088dc9b33e86b8ad87f96742e4de4bf
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M scripts/qmp/qmp-shell

  Log Message:
  -----------
  scripts/qmp-shell: Add pretty attribute to HMP shell

It's less useful, but it makes the initialization methods LSP
consistent, which quiets a mypy complaint.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210607200649.1840382-19-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: 2ac3f3786e09c2ad40da16fa4ff4b0f99200f72e
      
https://github.com/qemu/qemu/commit/2ac3f3786e09c2ad40da16fa4ff4b0f99200f72e
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M scripts/qmp/qmp-shell

  Log Message:
  -----------
  scripts/qmp-shell: Make verbose a public attribute

No real reason to hide this behind an underscore; make it part of the
initializer and make it a regular RW attribute.
Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210607200649.1840382-20-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: 1caa505766dbf7bd233b088e82bd7a745d2ba325
      
https://github.com/qemu/qemu/commit/1caa505766dbf7bd233b088e82bd7a745d2ba325
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M scripts/qmp/qmp-shell

  Log Message:
  -----------
  scripts/qmp-shell: move get_prompt() to prompt property

Small tidying; treat "prompt" like an immutable property instead of
function/method/routine.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210607200649.1840382-21-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: 1215a1fbef205ba9930a976619163271d8195cdb
      
https://github.com/qemu/qemu/commit/1215a1fbef205ba9930a976619163271d8195cdb
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M scripts/qmp/qmp-shell

  Log Message:
  -----------
  scripts/qmp-shell: remove prompt argument from read_exec_command

It's only ever used by one caller, we can just absorb that logic.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210607200649.1840382-22-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: ad4eebee00a52a6f0e9761ffd0fd0002c259bc21
      
https://github.com/qemu/qemu/commit/ad4eebee00a52a6f0e9761ffd0fd0002c259bc21
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M scripts/qmp/qmp-shell

  Log Message:
  -----------
  scripts/qmp-shell: move the REPL functionality into QMPShell

Instead of doing this in main, move it into the class itself. (This
makes it easier to put into the qemu.qmp package later by removing as
much as we can from the main() function.)

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210607200649.1840382-23-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: 6faf2384ec78d5a1e0b5dfe430e80cf2278e45c4
      
https://github.com/qemu/qemu/commit/6faf2384ec78d5a1e0b5dfe430e80cf2278e45c4
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M scripts/qmp/qmp-shell

  Log Message:
  -----------
  scripts/qmp-shell: Fix "FuzzyJSON" parser

I'm not sure when this regressed (Or maybe if it was ever working right
to begin with?), but the Python AST requires you to change "Names" to
"Constants" in order to truly convert `false` to `False`.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210607200649.1840382-24-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: db12abc20859e93e802f668a2f744222c96ada63
      
https://github.com/qemu/qemu/commit/db12abc20859e93e802f668a2f744222c96ada63
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M scripts/qmp/qmp-shell

  Log Message:
  -----------
  scripts/qmp-shell: refactor QMPCompleter

list is a generic type, but we expect to use strings directly. We could
subclass list[str], but pylint does not presently understand that
invocation.

Change this class to envelop a list instead of *being* a list, for
simpler mypy typing.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210607200649.1840382-25-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: 41574295829b9a34d43e7cb95847340942d1ddf5
      
https://github.com/qemu/qemu/commit/41574295829b9a34d43e7cb95847340942d1ddf5
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M scripts/qmp/qmp-shell

  Log Message:
  -----------
  scripts/qmp-shell: initialize completer early

Add an empty completer as a more type-safe placeholder instead of
'None'.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210607200649.1840382-26-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: 1acde76328de10beff07c7f1c8146af72813ecd7
      
https://github.com/qemu/qemu/commit/1acde76328de10beff07c7f1c8146af72813ecd7
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M python/qemu/qmp/__init__.py

  Log Message:
  -----------
  python/qmp: add QMPObject type alias

This is meant to represent any generic object seen in a QMPMessage, not
just the root object itself.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210607200649.1840382-27-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: 1eab88723c4c8c18cd67b4cad88dbbccf5916061
      
https://github.com/qemu/qemu/commit/1eab88723c4c8c18cd67b4cad88dbbccf5916061
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M scripts/qmp/qmp-shell

  Log Message:
  -----------
  scripts/qmp-shell: add mypy types

As per my usual, this patch is annotations only. Any changes with side
effects are done elsewhere.

Note: pylint does not understand the subscripts for Collection in Python 3.6,
so use the stronger Sequence type as a workaround.
Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210607200649.1840382-28-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: b0b8ca17e518bc57ae231ade4be4a7ed0e5f07f1
      
https://github.com/qemu/qemu/commit/b0b8ca17e518bc57ae231ade4be4a7ed0e5f07f1
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M scripts/qmp/qmp-shell

  Log Message:
  -----------
  scripts/qmp-shell: Accept SocketAddrT instead of string

Don't "extend" QEMUMonitorProtocol by changing the argument types. Move
the string parsing just outside of the class instead.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210607200649.1840382-29-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: 6e24a7edb8b64854636acd1f74abd8e5f1735b50
      
https://github.com/qemu/qemu/commit/6e24a7edb8b64854636acd1f74abd8e5f1735b50
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M scripts/qmp/qmp-shell

  Log Message:
  -----------
  scripts/qmp-shell: unprivatize 'pretty' property

Similar to verbose, there's no reason this needs to be hidden.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210607200649.1840382-30-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: eac8aabc92f80d9a41d9f01163921472e309334c
      
https://github.com/qemu/qemu/commit/eac8aabc92f80d9a41d9f01163921472e309334c
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M python/qemu/qmp/__init__.py

  Log Message:
  -----------
  python/qmp: return generic type from context manager

__enter__ can be invoked from a subclass, so it needs a more flexible
type.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210607200649.1840382-31-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: d1d14e59895b2ebd2953e9442225ffba56f80e9b
      
https://github.com/qemu/qemu/commit/d1d14e59895b2ebd2953e9442225ffba56f80e9b
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M scripts/qmp/qmp-shell

  Log Message:
  -----------
  scripts/qmp-shell: Use context manager instead of atexit

We can invoke the shell history writing when we leave the QMPShell scope
instead of relying on atexit. Doing so may be preferable to avoid global
state being registered from within a class instead of from the
application logic directly.

Use QMP's context manager to hook this history saving at close time,
which gets invoked when we leave the context block.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210607200649.1840382-32-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: be19c6a7126e5a463b3ef1ea23b985f6dc627a7a
      
https://github.com/qemu/qemu/commit/be19c6a7126e5a463b3ef1ea23b985f6dc627a7a
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M scripts/qmp/qmp-shell

  Log Message:
  -----------
  scripts/qmp-shell: use logging to show warnings

A perfect candidate is non-fatal shell history messages.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210607200649.1840382-33-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: 74688377feb551101f8a3e3de483df56d30299e4
      
https://github.com/qemu/qemu/commit/74688377feb551101f8a3e3de483df56d30299e4
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M scripts/qmp/qmp-shell

  Log Message:
  -----------
  scripts/qmp-shell: remove TODO

We still want to revamp qmp-shell again, but there's much more to the
idea than the comment now intuits. Remove it.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210607200649.1840382-34-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: c83055ef1d47cd03667d7608f3f5ff232484146e
      
https://github.com/qemu/qemu/commit/c83055ef1d47cd03667d7608f3f5ff232484146e
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M scripts/qmp/qmp-shell

  Log Message:
  -----------
  scripts/qmp-shell: Fix empty-transaction invocation

calling "transaction( )" is pointless, but valid. Rework the parser to
allow this kind of invocation. This helps clean up exception handling
later by removing accidental breakages of the parser that aren't
explicitly forbidden.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210607200649.1840382-35-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: 26d3ce9e5e42920a6f9c1f481d900e63a636b07d
      
https://github.com/qemu/qemu/commit/26d3ce9e5e42920a6f9c1f481d900e63a636b07d
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M scripts/qmp/qmp-shell

  Log Message:
  -----------
  scripts/qmp-shell: Remove too-broad-exception

We are only anticipating QMPShellErrors here, for syntax we weren't able
to understand. Other errors, if any, should be allowed to percolate
upwards.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210607200649.1840382-36-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: 7fc29896d237b6cb2db49e65f00882f554fc48c0
      
https://github.com/qemu/qemu/commit/7fc29896d237b6cb2db49e65f00882f554fc48c0
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M scripts/qmp/qmp-shell

  Log Message:
  -----------
  scripts/qmp-shell: convert usage comment to docstring

The nice usage comment should be a docstring instead of a comment, so
that it's visible from other python tooling.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210607200649.1840382-37-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: a64fe44d5abfd4aa933b17a8cf21d3c0b9df6143
      
https://github.com/qemu/qemu/commit/a64fe44d5abfd4aa933b17a8cf21d3c0b9df6143
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M scripts/qmp/qmp-shell

  Log Message:
  -----------
  scripts/qmp-shell: remove double-underscores

They're not needed; single underscore is enough to express intent that
these methods are "internal". double underscore is used as a weak name
mangling, but that isn't beneficial for us here.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210607200649.1840382-38-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: 6a1105adba41c3cd6371437b46c045ae9ea85314
      
https://github.com/qemu/qemu/commit/6a1105adba41c3cd6371437b46c045ae9ea85314
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M scripts/qmp/qmp-shell

  Log Message:
  -----------
  scripts/qmp-shell: make QMPShellError inherit QMPError

In preparation for moving qmp-shell into the qemu.qmp package, make
QMPShellError inherit from QMPError so that all custom errors in this
package all derive from QMPError.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210607200649.1840382-39-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: e359c5a8b8e6184c15806d1408de085aab9c268b
      
https://github.com/qemu/qemu/commit/e359c5a8b8e6184c15806d1408de085aab9c268b
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M scripts/qmp/qmp-shell

  Log Message:
  -----------
  scripts/qmp-shell: add docstrings

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210607200649.1840382-40-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: 6be7206efc394b0232912e7055c7298ec2b0352d
      
https://github.com/qemu/qemu/commit/6be7206efc394b0232912e7055c7298ec2b0352d
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    A python/qemu/qmp/qmp_shell.py
    R scripts/qmp/qmp-shell

  Log Message:
  -----------
  scripts/qmp-shell: move to python/qemu/qmp/qmp_shell.py

The script will be unavailable for a commit or two, which will help
preserve development history attached to the new file. A forwarder will
be added shortly afterwards.

With qmp_shell in the python qemu.qmp package, now it is fully type
checked, linted, etc. via the Python CI. It will be quite a bit harder
to accidentally break it again in the future.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210607200649.1840382-41-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: 957f3c5cee0ffd706cfabf4cf0e6b1247615fc59
      
https://github.com/qemu/qemu/commit/957f3c5cee0ffd706cfabf4cf0e6b1247615fc59
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M python/setup.cfg

  Log Message:
  -----------
  python: add qmp-shell entry point

now 'qmp-shell' should be available from the command line when
installing the python package.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210607200649.1840382-42-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: d08caefe6648fc0713af5361e2b88bee53b67ebb
      
https://github.com/qemu/qemu/commit/d08caefe6648fc0713af5361e2b88bee53b67ebb
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    A scripts/qmp/qmp-shell

  Log Message:
  -----------
  scripts/qmp-shell: add redirection shim

qmp-shell has a new home, add a redirect for a little while as the dust
settles.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210607200649.1840382-43-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: 0add99ea3ea91af8230e3933ad7826b2da25a44d
      
https://github.com/qemu/qemu/commit/0add99ea3ea91af8230e3933ad7826b2da25a44d
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2021-06-21 (Mon, 21 Jun 2021)

  Changed paths:
    M python/Pipfile.lock
    M python/qemu/qmp/__init__.py
    A python/qemu/qmp/qemu_ga_client.py
    A python/qemu/qmp/qmp_shell.py
    A python/qemu/qmp/qom.py
    A python/qemu/qmp/qom_common.py
    A python/qemu/qmp/qom_fuse.py
    M python/setup.cfg
    M scripts/qmp/qemu-ga-client
    M scripts/qmp/qmp-shell
    M scripts/qmp/qom-fuse
    M scripts/qmp/qom-get
    M scripts/qmp/qom-list
    M scripts/qmp/qom-set
    M scripts/qmp/qom-tree

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/jsnow-gitlab/tags/python-pull-request' 
into staging

Python Pull request

Moves QMP-related tools not used for build or automatic testing from
scripts/ to python/qemu/qmp/ where they will be protected from bitrot by
the check-python-* CI jobs.

stub forwarders are left in the old locations for now.

# gpg: Signature made Sat 19 Jun 2021 00:02:40 BST
# gpg:                using RSA key F9B7ABDBBCACDF95BE76CBD07DEF8106AAFC390E
# gpg: Good signature from "John Snow (John Huston) <jsnow@redhat.com>" [full]
# Primary key fingerprint: FAEB 9711 A12C F475 812F  18F2 88A9 064D 1835 61EB
#      Subkey fingerprint: F9B7 ABDB BCAC DF95 BE76  CBD0 7DEF 8106 AAFC 390E

* remotes/jsnow-gitlab/tags/python-pull-request: (72 commits)
  scripts/qmp-shell: add redirection shim
  python: add qmp-shell entry point
  scripts/qmp-shell: move to python/qemu/qmp/qmp_shell.py
  scripts/qmp-shell: add docstrings
  scripts/qmp-shell: make QMPShellError inherit QMPError
  scripts/qmp-shell: remove double-underscores
  scripts/qmp-shell: convert usage comment to docstring
  scripts/qmp-shell: Remove too-broad-exception
  scripts/qmp-shell: Fix empty-transaction invocation
  scripts/qmp-shell: remove TODO
  scripts/qmp-shell: use logging to show warnings
  scripts/qmp-shell: Use context manager instead of atexit
  python/qmp: return generic type from context manager
  scripts/qmp-shell: unprivatize 'pretty' property
  scripts/qmp-shell: Accept SocketAddrT instead of string
  scripts/qmp-shell: add mypy types
  python/qmp: add QMPObject type alias
  scripts/qmp-shell: initialize completer early
  scripts/qmp-shell: refactor QMPCompleter
  scripts/qmp-shell: Fix "FuzzyJSON" parser
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


Compare: https://github.com/qemu/qemu/compare/53f306f31654...0add99ea3ea9



reply via email to

[Prev in Thread] Current Thread [Next in Thread]