qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 1e4d8b: python: pin setuptools below v60.0.0


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 1e4d8b: python: pin setuptools below v60.0.0
Date: Sat, 22 Jan 2022 04:03:55 -0800

  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 1e4d8b31be35e54b6429fea54f5ecaa0083f91e7
      
https://github.com/qemu/qemu/commit/1e4d8b31be35e54b6429fea54f5ecaa0083f91e7
  Author: John Snow <jsnow@redhat.com>
  Date:   2022-01-21 (Fri, 21 Jan 2022)

  Changed paths:
    M python/Makefile
    M python/setup.cfg

  Log Message:
  -----------
  python: pin setuptools below v60.0.0

setuptools is a package that replaces the python stdlib 'distutils'. It
is generally installed by all venv-creating tools "by default". It isn't
actually needed at runtime for the qemu package, so our own setup.cfg
does not mention it as a dependency.

However, tox will create virtual environments that include it, and will
upgrade it to the very latest version. the 'venv' tool will also include
whichever version your host system happens to have.

Unfortunately, setuptools version 60.0.0 and above include a hack to
forcibly overwrite python's built-in distutils. The pylint tool that we
use to run code analysis checks on this package relies on distutils and
suffers regressions when setuptools >= 60.0.0 is present at all, see
https://github.com/PyCQA/pylint/issues/5704

Instruct tox and the 'check-dev' targets to avoid setuptools packages
that are too new, for now. Pipenv is unaffected, because setuptools 60
does not offer Python 3.6 support, and our pipenv config is pinned
against Python 3.6.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Beraldo Leal <bleal@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Tested-by: Cleber Rosa <crosa@redhat.com>
Message-id: 20220121005221.142236-1-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: 57a6b4478ce11a6871ea724778ff21f8290ea5d9
      
https://github.com/qemu/qemu/commit/57a6b4478ce11a6871ea724778ff21f8290ea5d9
  Author: John Snow <jsnow@redhat.com>
  Date:   2022-01-21 (Fri, 21 Jan 2022)

  Changed paths:
    M python/avocado.cfg

  Log Message:
  -----------
  python: use avocado's "new" runner

The old legacy runner no longer seems to work with output logging, so we
can't see failure logs when a test case fails. The new runner doesn't
(seem to) support Coverage.py yet, but seeing error output is a more
important feature.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Beraldo Leal <bleal@redhat.com>
Message-id: 20220119193916.4138217-3-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: dc6877bd2ea04a38700adcea2359d5d20c1082a6
      
https://github.com/qemu/qemu/commit/dc6877bd2ea04a38700adcea2359d5d20c1082a6
  Author: John Snow <jsnow@redhat.com>
  Date:   2022-01-21 (Fri, 21 Jan 2022)

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

  Log Message:
  -----------
  python/aqmp: fix docstring typo

Reported-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Beraldo Leal <bleal@redhat.com>


  Commit: 3bc72e3aed76e0326703db81964b13f1da075cbf
      
https://github.com/qemu/qemu/commit/3bc72e3aed76e0326703db81964b13f1da075cbf
  Author: John Snow <jsnow@redhat.com>
  Date:   2022-01-21 (Fri, 21 Jan 2022)

  Changed paths:
    M python/qemu/aqmp/legacy.py

  Log Message:
  -----------
  python/aqmp: add __del__ method to legacy interface

asyncio can complain *very* loudly if you forget to back out of things
gracefully before the garbage collector starts destroying objects that
contain live references to asyncio Tasks.

The usual fix is just to remember to call aqmp.disconnect(), but for the
sake of the legacy wrapper and quick, one-off scripts where a graceful
shutdown is not necessarily of paramount imporance, add a courtesy
cleanup that will trigger prior to seeing screenfuls of confusing
asyncio tracebacks.

Note that we can't *always* save you from yourself; depending on when
the GC runs, you might just seriously be out of luck. The best we can do
in this case is to gently remind you to clean up after yourself.

(Still much better than multiple pages of incomprehensible python
warnings for the crime of forgetting to put your toys away.)

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Beraldo Leal <bleal@redhat.com>


  Commit: 3b5bf136f5798a4ea2c66875d6337ca3d6b79434
      
https://github.com/qemu/qemu/commit/3b5bf136f5798a4ea2c66875d6337ca3d6b79434
  Author: John Snow <jsnow@redhat.com>
  Date:   2022-01-21 (Fri, 21 Jan 2022)

  Changed paths:
    M python/qemu/aqmp/qmp_client.py

  Log Message:
  -----------
  python/aqmp: handle asyncio.TimeoutError on execute()

This exception can be injected into any await statement. If we are
canceled via timeout, we want to clear the pending execution record on
our way out.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Beraldo Leal <bleal@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>


  Commit: 0e6bfd8b96e407db7b0cb5e8c14cc315a7154f53
      
https://github.com/qemu/qemu/commit/0e6bfd8b96e407db7b0cb5e8c14cc315a7154f53
  Author: John Snow <jsnow@redhat.com>
  Date:   2022-01-21 (Fri, 21 Jan 2022)

  Changed paths:
    M python/qemu/aqmp/legacy.py
    M python/qemu/aqmp/protocol.py

  Log Message:
  -----------
  python/aqmp: copy type definitions from qmp

Copy the remaining type definitions from QMP into the qemu.aqmp.legacy
module. Now, users that require the legacy interface don't need to
import anything else but qemu.aqmp.legacy wrapper.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Beraldo Leal <bleal@redhat.com>


  Commit: 728dcac5e356ce5b948943f21c0c72a1b2d96122
      
https://github.com/qemu/qemu/commit/728dcac5e356ce5b948943f21c0c72a1b2d96122
  Author: John Snow <jsnow@redhat.com>
  Date:   2022-01-21 (Fri, 21 Jan 2022)

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

  Log Message:
  -----------
  python/aqmp: add SocketAddrT to package root

It's a commonly needed definition, it can be re-exported by the root.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Beraldo Leal <bleal@redhat.com>


  Commit: 6e7751dc388df6daf425db0e245d4d3a10859803
      
https://github.com/qemu/qemu/commit/6e7751dc388df6daf425db0e245d4d3a10859803
  Author: John Snow <jsnow@redhat.com>
  Date:   2022-01-21 (Fri, 21 Jan 2022)

  Changed paths:
    M python/qemu/aqmp/__init__.py
    M python/qemu/aqmp/error.py
    M python/qemu/aqmp/events.py
    M python/qemu/aqmp/legacy.py
    M python/qemu/aqmp/protocol.py
    M python/qemu/aqmp/qmp_client.py

  Log Message:
  -----------
  python/aqmp: rename AQMPError to QMPError

This is in preparation for renaming qemu.aqmp to qemu.qmp. I should have
done this from this from the very beginning, but it's a convenient time
to make sure this churn is taken care of.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>


  Commit: 7017f3853a59cf9d16c6be24dc657417d1c8f0cb
      
https://github.com/qemu/qemu/commit/7017f3853a59cf9d16c6be24dc657417d1c8f0cb
  Author: John Snow <jsnow@redhat.com>
  Date:   2022-01-21 (Fri, 21 Jan 2022)

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

  Log Message:
  -----------
  python/qemu-ga-client: don't use deprecated CLI syntax in usage comment

Cleanup related to commit ccd3b3b8112b670f, "qemu-option: warn for
short-form boolean options".

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


  Commit: 26db07516fea6e264ba3c30651145f3873f7e4a7
      
https://github.com/qemu/qemu/commit/26db07516fea6e264ba3c30651145f3873f7e4a7
  Author: John Snow <jsnow@redhat.com>
  Date:   2022-01-21 (Fri, 21 Jan 2022)

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

  Log Message:
  -----------
  python/qmp: switch qemu-ga-client to AQMP

Async QMP always raises a "ConnectError" on any connection error which
houses the cause in a second exception. We can check if this root cause
was python's ConnectionError to determine a fairly similar condition to
the original error check here.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Beraldo Leal <bleal@redhat.com>


  Commit: 8d6cdc5118e8c7d71ccb716ded2a618e6f78a295
      
https://github.com/qemu/qemu/commit/8d6cdc5118e8c7d71ccb716ded2a618e6f78a295
  Author: John Snow <jsnow@redhat.com>
  Date:   2022-01-21 (Fri, 21 Jan 2022)

  Changed paths:
    M python/qemu/qmp/qom.py
    M python/qemu/qmp/qom_common.py
    M python/qemu/qmp/qom_fuse.py

  Log Message:
  -----------
  python/qmp: switch qom tools to AQMP

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Beraldo Leal <bleal@redhat.com>


  Commit: f3efd12930f34b9724e15d8fd2ff56a97b67219d
      
https://github.com/qemu/qemu/commit/f3efd12930f34b9724e15d8fd2ff56a97b67219d
  Author: John Snow <jsnow@redhat.com>
  Date:   2022-01-21 (Fri, 21 Jan 2022)

  Changed paths:
    M python/qemu/aqmp/legacy.py
    M python/qemu/qmp/qmp_shell.py

  Log Message:
  -----------
  python/qmp: switch qmp-shell to AQMP

We have a replacement for async QMP, but it doesn't have feature parity
yet. For now, then, port the old tool onto the new backend.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>


  Commit: 0347c4c4cfed47e54d9dc275ceb28d35b250749f
      
https://github.com/qemu/qemu/commit/0347c4c4cfed47e54d9dc275ceb28d35b250749f
  Author: John Snow <jsnow@redhat.com>
  Date:   2022-01-21 (Fri, 21 Jan 2022)

  Changed paths:
    R python/qemu/qmp/qemu_ga_client.py
    R python/qemu/qmp/qom.py
    R python/qemu/qmp/qom_common.py
    R python/qemu/qmp/qom_fuse.py
    A python/qemu/utils/qemu_ga_client.py
    A python/qemu/utils/qom.py
    A python/qemu/utils/qom_common.py
    A python/qemu/utils/qom_fuse.py
    M python/setup.cfg
    M scripts/qmp/qemu-ga-client
    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:
  -----------
  python: move qmp utilities to python/qemu/utils

In order to upload a QMP package to PyPI, I want to remove any scripts
that I am not 100% confident I want to support upstream, beyond our
castle walls.

Move most of our QMP utilities into the utils package so we can split
them out from the PyPI upload.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Beraldo Leal <bleal@redhat.com>


  Commit: fd9c3a6219b0470c356c8486188052d353846806
      
https://github.com/qemu/qemu/commit/fd9c3a6219b0470c356c8486188052d353846806
  Author: John Snow <jsnow@redhat.com>
  Date:   2022-01-21 (Fri, 21 Jan 2022)

  Changed paths:
    M python/README.rst
    A python/qemu/aqmp/qmp_shell.py
    R python/qemu/qmp/qmp_shell.py
    M python/setup.cfg
    M scripts/qmp/qmp-shell

  Log Message:
  -----------
  python: move qmp-shell under the AQMP package

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Beraldo Leal <bleal@redhat.com>


  Commit: 99221256151845f5eb4cedac750b08e7ab14d92d
      
https://github.com/qemu/qemu/commit/99221256151845f5eb4cedac750b08e7ab14d92d
  Author: John Snow <jsnow@redhat.com>
  Date:   2022-01-21 (Fri, 21 Jan 2022)

  Changed paths:
    M scripts/cpu-x86-uarch-abi.py

  Log Message:
  -----------
  scripts/cpu-x86-uarch-abi: fix CLI parsing

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>


  Commit: 0665410dcf3d3fa8758545668998dd16d3abbaa9
      
https://github.com/qemu/qemu/commit/0665410dcf3d3fa8758545668998dd16d3abbaa9
  Author: John Snow <jsnow@redhat.com>
  Date:   2022-01-21 (Fri, 21 Jan 2022)

  Changed paths:
    M scripts/cpu-x86-uarch-abi.py

  Log Message:
  -----------
  scripts/cpu-x86-uarch-abi: switch to AQMP

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Beraldo Leal <bleal@redhat.com>


  Commit: 05908602429cf9d6fce9b60704b8395f6d295441
      
https://github.com/qemu/qemu/commit/05908602429cf9d6fce9b60704b8395f6d295441
  Author: John Snow <jsnow@redhat.com>
  Date:   2022-01-21 (Fri, 21 Jan 2022)

  Changed paths:
    M scripts/render_block_graph.py

  Log Message:
  -----------
  scripts/render-block-graph: switch to AQMP

Creating an instance of qemu.aqmp.ExecuteError is too involved here, so
just drop the specificity down to a generic QMPError.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Beraldo Leal <bleal@redhat.com>


  Commit: aeb0ae95b7f18c66158792641cb6ba0cde5789ab
      
https://github.com/qemu/qemu/commit/aeb0ae95b7f18c66158792641cb6ba0cde5789ab
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-01-22 (Sat, 22 Jan 2022)

  Changed paths:
    M python/Makefile
    M python/README.rst
    M python/avocado.cfg
    M python/qemu/aqmp/__init__.py
    M python/qemu/aqmp/error.py
    M python/qemu/aqmp/events.py
    M python/qemu/aqmp/legacy.py
    M python/qemu/aqmp/protocol.py
    M python/qemu/aqmp/qmp_client.py
    A python/qemu/aqmp/qmp_shell.py
    R python/qemu/qmp/qemu_ga_client.py
    R python/qemu/qmp/qmp_shell.py
    R python/qemu/qmp/qom.py
    R python/qemu/qmp/qom_common.py
    R python/qemu/qmp/qom_fuse.py
    A python/qemu/utils/qemu_ga_client.py
    A python/qemu/utils/qom.py
    A python/qemu/utils/qom_common.py
    A python/qemu/utils/qom_fuse.py
    M python/setup.cfg
    M scripts/cpu-x86-uarch-abi.py
    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
    M scripts/render_block_graph.py

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

Python patches

A few fixes to the Python CI tests, a few fixes to the (async) QMP
library, and a set of patches that begin to shift us towards using the
new qmp lib.

# gpg: Signature made Sat 22 Jan 2022 00:07:58 GMT
# 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:
  scripts/render-block-graph: switch to AQMP
  scripts/cpu-x86-uarch-abi: switch to AQMP
  scripts/cpu-x86-uarch-abi: fix CLI parsing
  python: move qmp-shell under the AQMP package
  python: move qmp utilities to python/qemu/utils
  python/qmp: switch qmp-shell to AQMP
  python/qmp: switch qom tools to AQMP
  python/qmp: switch qemu-ga-client to AQMP
  python/qemu-ga-client: don't use deprecated CLI syntax in usage comment
  python/aqmp: rename AQMPError to QMPError
  python/aqmp: add SocketAddrT to package root
  python/aqmp: copy type definitions from qmp
  python/aqmp: handle asyncio.TimeoutError on execute()
  python/aqmp: add __del__ method to legacy interface
  python/aqmp: fix docstring typo
  python: use avocado's "new" runner
  python: pin setuptools below v60.0.0

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


Compare: https://github.com/qemu/qemu/compare/5e9d14f2bea6...aeb0ae95b7f1



reply via email to

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