[PULL 00/19] Python patches

John Snow posted 19 patches 1 week, 4 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20250916162404.9195-1-jsnow@redhat.com
Maintainers: John Snow <jsnow@redhat.com>, Cleber Rosa <crosa@redhat.com>, Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>
There is a newer version of this series
python/qemu/machine/qtest.py     |   2 +
python/qemu/qmp/__init__.py      |   3 +-
python/qemu/qmp/error.py         |   7 +-
python/qemu/qmp/events.py        |  50 ++++++--
python/qemu/qmp/legacy.py        |  46 +++++---
python/qemu/qmp/message.py       |  22 ++--
python/qemu/qmp/models.py        |   8 +-
python/qemu/qmp/protocol.py      | 194 +++++++++++++++++++------------
python/qemu/qmp/qmp_client.py    | 155 +++++++++++++++++-------
python/qemu/qmp/qmp_shell.py     | 165 ++++++++++++++++++--------
python/qemu/qmp/qmp_tui.py       |  30 +++--
python/qemu/qmp/util.py          | 143 ++++++-----------------
python/tests/protocol.py         |  10 +-
tests/qemu-iotests/147           |   1 +
tests/qemu-iotests/151           |   5 +
tests/qemu-iotests/check         |   4 +
tests/qemu-iotests/testenv.py    |   7 +-
tests/qemu-iotests/testrunner.py |   9 +-
18 files changed, 532 insertions(+), 329 deletions(-)
[PULL 00/19] Python patches
Posted by John Snow 1 week, 4 days ago
The following changes since commit 190d5d7fd725ff754f94e8e0cbfb69f279c82b5d:

  Merge tag 'pull-request-2025-09-09' of https://gitlab.com/thuth/qemu into staging (2025-09-11 12:41:01 +0100)

are available in the Git repository at:

  https://gitlab.com/jsnow/qemu.git tags/python-pull-request

for you to fetch changes up to 9a494d83538680651197651031375c2b6fa2490b:

  iotests/check: always enable all python warnings (2025-09-15 14:36:02 -0400)

----------------------------------------------------------------
Python Pull Request

Python 3.14 support & synchronize with python-qemu-qmp repo

----------------------------------------------------------------

Adam Dorsey (1):
  python: backport 'feat: allow setting read buffer limit'

Daniel P. Berrangé (5):
  iotests: drop compat for old version context manager
  python: ensure QEMUQtestProtocol closes its socket
  iotests/147: ensure temporary sockets are closed before exiting
  iotests/151: ensure subprocesses are cleaned up
  iotests/check: always enable all python warnings

John Snow (13):
  python: backport 'Change error classes to have better repr methods'
  python: backport 'EventListener: add __repr__ method'
  python: backport 'kick event queue on legacy event_pull()'
  python: backport 'protocol: adjust logging name when changing client
    name'
  python: backport 'drop Python3.6 workarounds'
  python: backport 'Use @asynciocontextmanager'
  python: backport 'qmp-shell: add common_parser()'
  python: backport 'make require() preserve async-ness'
  python: backport 'qmp-shell-wrap: handle missing binary gracefully'
  python: backport 'qmp-tui: Do not crash if optional dependencies are
    not met'
  python: backport 'Remove deprecated get_event_loop calls'
  python: backport 'avoid creating additional event loops per thread'
  python: synchronize qemu.qmp documentation

 python/qemu/machine/qtest.py     |   2 +
 python/qemu/qmp/__init__.py      |   3 +-
 python/qemu/qmp/error.py         |   7 +-
 python/qemu/qmp/events.py        |  50 ++++++--
 python/qemu/qmp/legacy.py        |  46 +++++---
 python/qemu/qmp/message.py       |  22 ++--
 python/qemu/qmp/models.py        |   8 +-
 python/qemu/qmp/protocol.py      | 194 +++++++++++++++++++------------
 python/qemu/qmp/qmp_client.py    | 155 +++++++++++++++++-------
 python/qemu/qmp/qmp_shell.py     | 165 ++++++++++++++++++--------
 python/qemu/qmp/qmp_tui.py       |  30 +++--
 python/qemu/qmp/util.py          | 143 ++++++-----------------
 python/tests/protocol.py         |  10 +-
 tests/qemu-iotests/147           |   1 +
 tests/qemu-iotests/151           |   5 +
 tests/qemu-iotests/check         |   4 +
 tests/qemu-iotests/testenv.py    |   7 +-
 tests/qemu-iotests/testrunner.py |   9 +-
 18 files changed, 532 insertions(+), 329 deletions(-)

-- 
2.51.0

Re: [PULL 00/19] Python patches
Posted by Richard Henderson 1 week, 4 days ago
On 9/16/25 09:23, John Snow wrote:
> The following changes since commit 190d5d7fd725ff754f94e8e0cbfb69f279c82b5d:
> 
>    Merge tag 'pull-request-2025-09-09' ofhttps://gitlab.com/thuth/qemu into staging (2025-09-11 12:41:01 +0100)
> 
> are available in the Git repository at:
> 
>    https://gitlab.com/jsnow/qemu.git tags/python-pull-request
> 
> for you to fetch changes up to 9a494d83538680651197651031375c2b6fa2490b:
> 
>    iotests/check: always enable all python warnings (2025-09-15 14:36:02 -0400)
> 
> ----------------------------------------------------------------
> Python Pull Request
> 
> Python 3.14 support & synchronize with python-qemu-qmp repo


Applied, thanks.  Please update https://wiki.qemu.org/ChangeLog/10.2 as appropriate.

r~
Re: [PULL 00/19] Python patches
Posted by John Snow 1 week, 4 days ago
On Tue, Sep 16, 2025 at 12:24 PM John Snow <jsnow@redhat.com> wrote:
>
> The following changes since commit 190d5d7fd725ff754f94e8e0cbfb69f279c82b5d:
>
>   Merge tag 'pull-request-2025-09-09' of https://gitlab.com/thuth/qemu into staging (2025-09-11 12:41:01 +0100)
>
> are available in the Git repository at:
>
>   https://gitlab.com/jsnow/qemu.git tags/python-pull-request
>
> for you to fetch changes up to 9a494d83538680651197651031375c2b6fa2490b:
>
>   iotests/check: always enable all python warnings (2025-09-15 14:36:02 -0400)
>
> ----------------------------------------------------------------
> Python Pull Request
>
> Python 3.14 support & synchronize with python-qemu-qmp repo
>
> ----------------------------------------------------------------
>
> Adam Dorsey (1):
>   python: backport 'feat: allow setting read buffer limit'
>
> Daniel P. Berrangé (5):
>   iotests: drop compat for old version context manager
>   python: ensure QEMUQtestProtocol closes its socket
>   iotests/147: ensure temporary sockets are closed before exiting
>   iotests/151: ensure subprocesses are cleaned up
>   iotests/check: always enable all python warnings
>
> John Snow (13):
>   python: backport 'Change error classes to have better repr methods'
>   python: backport 'EventListener: add __repr__ method'
>   python: backport 'kick event queue on legacy event_pull()'
>   python: backport 'protocol: adjust logging name when changing client
>     name'
>   python: backport 'drop Python3.6 workarounds'
>   python: backport 'Use @asynciocontextmanager'
>   python: backport 'qmp-shell: add common_parser()'
>   python: backport 'make require() preserve async-ness'
>   python: backport 'qmp-shell-wrap: handle missing binary gracefully'
>   python: backport 'qmp-tui: Do not crash if optional dependencies are
>     not met'
>   python: backport 'Remove deprecated get_event_loop calls'
>   python: backport 'avoid creating additional event loops per thread'
>   python: synchronize qemu.qmp documentation
>
>  python/qemu/machine/qtest.py     |   2 +
>  python/qemu/qmp/__init__.py      |   3 +-
>  python/qemu/qmp/error.py         |   7 +-
>  python/qemu/qmp/events.py        |  50 ++++++--
>  python/qemu/qmp/legacy.py        |  46 +++++---
>  python/qemu/qmp/message.py       |  22 ++--
>  python/qemu/qmp/models.py        |   8 +-
>  python/qemu/qmp/protocol.py      | 194 +++++++++++++++++++------------
>  python/qemu/qmp/qmp_client.py    | 155 +++++++++++++++++-------
>  python/qemu/qmp/qmp_shell.py     | 165 ++++++++++++++++++--------
>  python/qemu/qmp/qmp_tui.py       |  30 +++--
>  python/qemu/qmp/util.py          | 143 ++++++-----------------
>  python/tests/protocol.py         |  10 +-
>  tests/qemu-iotests/147           |   1 +
>  tests/qemu-iotests/151           |   5 +
>  tests/qemu-iotests/check         |   4 +
>  tests/qemu-iotests/testenv.py    |   7 +-
>  tests/qemu-iotests/testrunner.py |   9 +-
>  18 files changed, 532 insertions(+), 329 deletions(-)
>
> --
> 2.51.0
>
>

CC qemu-stable. For the stable pull, this subset of patches should be
sufficient:

jsnow@jsnow-thinkpadp16vgen1 ~/s/q/build (python)> stg series --description
+ python-backport-kick-event     # python: backport 'kick event queue
on legacy event_pull()'
+ python-backport-drop-python3.6 # python: backport 'drop Python3.6 workarounds'
+ python-backport-use            # python: backport 'Use @asynciocontextmanager'
+ python-backport-remove         # python: backport 'Remove deprecated
get_event_loop calls'
+ python-backport-avoid-creating # python: backport 'avoid creating
additional event loops per thread'
+ iotests-drop-compat-for-old    # iotests: drop compat for old
version context manager
+ python-ensure                  # python: ensure QEMUQtestProtocol
closes its socket
+ iotests-147-ensure-temporary   # iotests/147: ensure temporary
sockets are closed before exiting
+ iotests-151-ensure             # iotests/151: ensure subprocesses
are cleaned up
> iotests-check-always-enable    # iotests/check: always enable all python warnings

i.e. patches 3, 5-6, 12-13, and 15-19. Tested locally in the python
tests dir (make check-dev && make check-tox && make check-minreqs) and
via normal build and test (../configure --enable-docs && make -j13 &&
make check)

Thanks,
--js.