[PATCH v3 01/19] python: backport 'Change error classes to have better repr methods'

2025-09-20 Thread John Snow
of ExecuteError, the pseudo-field that isn't actually correlated to an input argument can be re-imagined as a read-only property; this forces consistency in the class and makes the repr output more obviously correct. Signed-off-by: John Snow cherry picked from com

[PATCH v3 05/19] python: backport 'drop Python3.6 workarounds'

2025-09-20 Thread John Snow
Now that the minimum version is 3.7, drop some of the 3.6-specific hacks we've been carrying. A single remaining compatibility hack concerning 3.6's lack of @asynccontextmanager is addressed in the following commit. Signed-off-by: John Snow cherry picked from commit pytho

[PATCH v3 08/19] python: backport 'feat: allow setting read buffer limit'

2025-09-20 Thread John Snow
in linter fixups. --js] Signed-off-by: John Snow Reviewed-by: Daniel P. Berrangé --- python/qemu/qmp/protocol.py | 25 - python/qemu/qmp/qmp_client.py | 18 ++ 2 files changed, 30 insertions(+), 13 deletions(-) diff --git a/python/qemu/qmp/protocol.py b/p

Re: [PATCH] tests/functional: add --debug CLI arg

2025-09-20 Thread John Snow
On Tue, Sep 9, 2025 at 6:37 AM Thomas Huth wrote: > > On 07/08/2025 23.46, John Snow wrote: > > On Thu, Jul 24, 2025 at 3:47 PM Thomas Huth wrote: > >> > >> On 21/07/2025 22.38, John Snow wrote: > >>> On Thu, Jul 17, 2025 at 4:44 AM Alex Bennée &g

[PATCH v3 16/19] python: ensure QEMUQtestProtocol closes its socket

2025-09-19 Thread John Snow
Signed-off-by: John Snow --- python/qemu/machine/qtest.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/qemu/machine/qtest.py b/python/qemu/machine/qtest.py index 4f5ede85b23..781f674ffaf 100644 --- a/python/qemu/machine/qtest.py +++ b/python/qemu/machine/qtest.py @@ -177,6 +177,8

[PATCH v3 14/19] python: synchronize qemu.qmp documentation

2025-09-18 Thread John Snow
d "COPYING" instead and are therefore left unchanged. Signed-off-by: John Snow Reviewed-by: Daniel P. Berrangé --- python/qemu/qmp/__init__.py | 3 +- python/qemu/qmp/events.py | 35 +++--- python/qemu/qmp/legacy.py | 4 +- python/qemu/qmp/message.py| 10

[PATCH v3 13/19] python: backport 'avoid creating additional event loops per thread'

2025-09-17 Thread John Snow
new loops created with new_event_loop() so that future calls to get_event_loop() will return the loop already created. Reported-by: Richard W.M. Jones Reported-by: Daniel P. Berrangé Signed-off-by: John Snow cherry picked from commit python-qemu-qmp@21ce2ee4f2df87efe84a27b9c5112487f4670622 cherry

Re: [PULL 00/19] Python patches

2025-09-16 Thread John Snow
On Tue, Sep 16, 2025 at 12:24 PM John Snow 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 ava

[PULL 12/19] python: backport 'Remove deprecated get_event_loop calls'

2025-09-16 Thread John Snow
fact one of the erroneous users that should not have been using this function: if there's no running event loop inside of a coroutine, you're in big trouble :) Signed-off-by: John Snow cherry picked from commit python-qemu-qmp@aa1ff9907603a3033296027e1bd021133df86ef1 Signed-off-by:

[PULL 00/19] Python patches

2025-09-16 Thread John Snow
et 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 'Event

[PULL 06/19] python: backport 'Use @asynciocontextmanager'

2025-09-16 Thread John Snow
This removes a non-idiomatic use of a "coroutine callback" in favor of something a bit more standardized. Signed-off-by: John Snow cherry picked from commit python-qemu-qmp@commit 97f7ffa3be17a50544b52767d14b6fd478c07b9e Signed-off-by: John Snow Reviewed-by: Daniel P. Berrangé -

[PULL 10/19] python: backport 'qmp-shell-wrap: handle missing binary gracefully'

2025-09-16 Thread John Snow
Signed-off-by: John Snow cherry picked from commit python-qemu-qmp@9c889dcbd58817b0c917a9d2dd16161f48ac8203 Signed-off-by: John Snow Reviewed-by: Daniel P. Berrangé --- python/qemu/qmp/qmp_shell.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/qemu/qmp/qmp_shell.py b/python

[PULL 03/19] python: backport 'kick event queue on legacy event_pull()'

2025-09-16 Thread John Snow
This corrects an oversight in qmp-shell operation where new events will not accumulate in the event queue when pressing "enter" with an empty command buffer, so no new events show up. Reported-by: Jag Raman Signed-off-by: John Snow cherry picked from commit pytho

[PULL 04/19] python: backport 'protocol: adjust logging name when changing client name'

2025-09-16 Thread John Snow
The client name is mutable, so the logging name should also change to reflect it when it changes. Signed-off-by: John Snow cherry picked from commit python-qemu-qmp@e10b73c633ce138ba30bc8beccd2ab31989eaf3d Reviewed-by: Daniel P. Berrangé --- python/qemu/qmp/protocol.py | 24

[PULL 08/19] python: backport 'feat: allow setting read buffer limit'

2025-09-16 Thread John Snow
in linter fixups. --js] Signed-off-by: John Snow Reviewed-by: Daniel P. Berrangé --- python/qemu/qmp/protocol.py | 25 - python/qemu/qmp/qmp_client.py | 18 ++ 2 files changed, 30 insertions(+), 13 deletions(-) diff --git a/python/qemu/qmp/protocol.py b/p

[PULL 16/19] python: ensure QEMUQtestProtocol closes its socket

2025-09-16 Thread John Snow
Signed-off-by: John Snow --- python/qemu/machine/qtest.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/qemu/machine/qtest.py b/python/qemu/machine/qtest.py index 4f5ede85b23..781f674ffaf 100644 --- a/python/qemu/machine/qtest.py +++ b/python/qemu/machine/qtest.py @@ -177,6 +177,8

[PULL 01/19] python: backport 'Change error classes to have better repr methods'

2025-09-16 Thread John Snow
of ExecuteError, the pseudo-field that isn't actually correlated to an input argument can be re-imagined as a read-only property; this forces consistency in the class and makes the repr output more obviously correct. Signed-off-by: John Snow cherry picked from com

[PULL 15/19] iotests: drop compat for old version context manager

2025-09-16 Thread John Snow
From: Daniel P. Berrangé Our minimum python is now 3.9, so back compat with prior python versions is no longer required. Signed-off-by: Daniel P. Berrangé Signed-off-by: John Snow --- tests/qemu-iotests/testenv.py| 7 ++- tests/qemu-iotests/testrunner.py | 9 ++--- 2 files

[PULL 09/19] python: backport 'make require() preserve async-ness'

2025-09-16 Thread John Snow
in order to preserve the "async" flag for docs, the require() decorator needs to differentiate based on whether it is decorating a sync or async function and use a different wrapping mechanism accordingly. Phew. Signed-off-by: John Snow cherry picked from commit python-qemu-qmp@40aa9699

[PULL 05/19] python: backport 'drop Python3.6 workarounds'

2025-09-16 Thread John Snow
Now that the minimum version is 3.7, drop some of the 3.6-specific hacks we've been carrying. A single remaining compatibility hack concerning 3.6's lack of @asynccontextmanager is addressed in the following commit. Signed-off-by: John Snow cherry picked from commit pytho

[PULL 07/19] python: backport 'qmp-shell: add common_parser()'

2025-09-16 Thread John Snow
Signed-off-by: John Snow cherry picked from commit python-qemu-qmp@20a88c2471f37d10520b2409046d59e1d0f1e905 Signed-off-by: John Snow Signed-off-by: Daniel P. Berrangé --- python/qemu/qmp/qmp_shell.py | 35 --- 1 file changed, 16 insertions(+), 19 deletions

[PULL 18/19] iotests/151: ensure subprocesses are cleaned up

2025-09-16 Thread John Snow
garbage collected. Signed-off-by: Daniel P. Berrangé Signed-off-by: John Snow --- tests/qemu-iotests/151 | 5 + 1 file changed, 5 insertions(+) diff --git a/tests/qemu-iotests/151 b/tests/qemu-iotests/151 index f2ff9c5dac2..06ee3585db9 100755 --- a/tests/qemu-iotests/151 +++ b/tests/qemu-iotests

[PULL 17/19] iotests/147: ensure temporary sockets are closed before exiting

2025-09-16 Thread John Snow
From: Daniel P. Berrangé This avoids the python resource leak detector from issuing warnings in the iotests. Signed-off-by: Daniel P. Berrangé Signed-off-by: John Snow --- tests/qemu-iotests/147 | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qemu-iotests/147 b/tests/qemu-iotests

[PULL 19/19] iotests/check: always enable all python warnings

2025-09-16 Thread John Snow
will also display warnings. Signed-off-by: Daniel P. Berrangé Signed-off-by: John Snow --- tests/qemu-iotests/check | 4 1 file changed, 4 insertions(+) diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check index 545f9ec7bdd..d9b7c1d5989 100755 --- a/tests/qemu-iotests/check

[PULL 14/19] python: synchronize qemu.qmp documentation

2025-09-16 Thread John Snow
d "COPYING" instead and are therefore left unchanged. Signed-off-by: John Snow Reviewed-by: Daniel P. Berrangé --- python/qemu/qmp/__init__.py | 3 +- python/qemu/qmp/events.py | 35 +++--- python/qemu/qmp/legacy.py | 4 +- python/qemu/qmp/message.py| 10

[PULL 11/19] python: backport 'qmp-tui: Do not crash if optional dependencies are not met'

2025-09-16 Thread John Snow
the import statements. Signed-off-by: John Snow cherry picked from commit python-qemu-qmp@df520dcacf9a75dd4c82ab1129768de4128b554c Signed-off-by: John Snow Reviewed-by: Daniel P. Berrangé --- python/qemu/qmp/qmp_tui.py | 19 +++ 1 file changed, 15 insertions(+), 4 deletions

[PULL 13/19] python: backport 'avoid creating additional event loops per thread'

2025-09-16 Thread John Snow
new loops created with new_event_loop() so that future calls to get_event_loop() will return the loop already created. Reported-by: Richard W.M. Jones Reported-by: Daniel P. Berrangé Signed-off-by: John Snow cherry picked from commit python-qemu-qmp@21ce2ee4f2df87efe84a27b9c5112487f4670622 cherry

[PULL 02/19] python: backport 'EventListener: add __repr__ method'

2025-09-16 Thread John Snow
When the object is not stateful, this repr method prints what you'd expect. In cases where there are pending events, the output is augmented to illustrate that. The object itself has no idea if it's "active" or not, so it cannot convey that information. Signed-off-by: John

[PATCH v3 11/19] python: backport 'qmp-tui: Do not crash if optional dependencies are not met'

2025-09-14 Thread John Snow
the import statements. Signed-off-by: John Snow cherry picked from commit python-qemu-qmp@df520dcacf9a75dd4c82ab1129768de4128b554c Signed-off-by: John Snow Reviewed-by: Daniel P. Berrangé --- python/qemu/qmp/qmp_tui.py | 19 +++ 1 file changed, 15 insertions(+), 4 deletions

[PATCH v3 06/19] python: backport 'Use @asynciocontextmanager'

2025-09-08 Thread John Snow
This removes a non-idiomatic use of a "coroutine callback" in favor of something a bit more standardized. Signed-off-by: John Snow cherry picked from commit python-qemu-qmp@commit 97f7ffa3be17a50544b52767d14b6fd478c07b9e Signed-off-by: John Snow Reviewed-by: Daniel P. Berrangé -

[PATCH v3 19/19] iotests/check: always enable all python warnings

2025-09-08 Thread John Snow
will also display warnings. Signed-off-by: Daniel P. Berrangé Signed-off-by: John Snow --- tests/qemu-iotests/check | 4 1 file changed, 4 insertions(+) diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check index 545f9ec7bdd..d9b7c1d5989 100755 --- a/tests/qemu-iotests/check

Re: [PATCH v2 01/18] python: backport 'Change error classes to have better repr methods'

2025-09-08 Thread John Snow
On Mon, Sep 8, 2025 at 12:23 PM Daniel P. Berrangé wrote: > > On Wed, Sep 03, 2025 at 01:11:07AM -0400, John Snow wrote: > > By passing all of the arguments to the base class and overriding the > > __str__ method when we want a different "human readable" message that

[PATCH v3 17/19] iotests/147: ensure temporary sockets are closed before exiting

2025-09-08 Thread John Snow
From: Daniel P. Berrangé This avoids the python resource leak detector from issuing warnings in the iotests. Signed-off-by: Daniel P. Berrangé Signed-off-by: John Snow --- tests/qemu-iotests/147 | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qemu-iotests/147 b/tests/qemu-iotests

[PATCH v3 18/19] iotests/151: ensure subprocesses are cleaned up

2025-09-08 Thread John Snow
garbage collected. Signed-off-by: Daniel P. Berrangé Signed-off-by: John Snow --- tests/qemu-iotests/151 | 5 + 1 file changed, 5 insertions(+) diff --git a/tests/qemu-iotests/151 b/tests/qemu-iotests/151 index f2ff9c5dac2..06ee3585db9 100755 --- a/tests/qemu-iotests/151 +++ b/tests/qemu-iotests

[PATCH v3 09/19] python: backport 'make require() preserve async-ness'

2025-09-08 Thread John Snow
in order to preserve the "async" flag for docs, the require() decorator needs to differentiate based on whether it is decorating a sync or async function and use a different wrapping mechanism accordingly. Phew. Signed-off-by: John Snow cherry picked from commit python-qemu-qmp@40aa9699

[PATCH v3 03/19] python: backport 'kick event queue on legacy event_pull()'

2025-09-08 Thread John Snow
This corrects an oversight in qmp-shell operation where new events will not accumulate in the event queue when pressing "enter" with an empty command buffer, so no new events show up. Reported-by: Jag Raman Signed-off-by: John Snow cherry picked from commit pytho

[PATCH v3 02/19] python: backport 'EventListener: add __repr__ method'

2025-09-08 Thread John Snow
When the object is not stateful, this repr method prints what you'd expect. In cases where there are pending events, the output is augmented to illustrate that. The object itself has no idea if it's "active" or not, so it cannot convey that information. Signed-off-by: John

[PATCH v3 04/19] python: backport 'protocol: adjust logging name when changing client name'

2025-09-08 Thread John Snow
The client name is mutable, so the logging name should also change to reflect it when it changes. Signed-off-by: John Snow cherry picked from commit python-qemu-qmp@e10b73c633ce138ba30bc8beccd2ab31989eaf3d Reviewed-by: Daniel P. Berrangé --- python/qemu/qmp/protocol.py | 24

[PATCH v3 10/19] python: backport 'qmp-shell-wrap: handle missing binary gracefully'

2025-09-08 Thread John Snow
Signed-off-by: John Snow cherry picked from commit python-qemu-qmp@9c889dcbd58817b0c917a9d2dd16161f48ac8203 Signed-off-by: John Snow Reviewed-by: Daniel P. Berrangé --- python/qemu/qmp/qmp_shell.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/qemu/qmp/qmp_shell.py b/python

[PATCH v3 07/19] python: backport 'qmp-shell: add common_parser()'

2025-09-08 Thread John Snow
Signed-off-by: John Snow cherry picked from commit python-qemu-qmp@20a88c2471f37d10520b2409046d59e1d0f1e905 Signed-off-by: John Snow Signed-off-by: Daniel P. Berrangé --- python/qemu/qmp/qmp_shell.py | 35 --- 1 file changed, 16 insertions(+), 19 deletions

[PATCH v3 12/19] python: backport 'Remove deprecated get_event_loop calls'

2025-09-08 Thread John Snow
fact one of the erroneous users that should not have been using this function: if there's no running event loop inside of a coroutine, you're in big trouble :) Signed-off-by: John Snow cherry picked from commit python-qemu-qmp@aa1ff9907603a3033296027e1bd021133df86ef1 Signed-off-by:

[PATCH v3 15/19] iotests: drop compat for old version context manager

2025-09-08 Thread John Snow
From: Daniel P. Berrangé Our minimum python is now 3.9, so back compat with prior python versions is no longer required. Signed-off-by: Daniel P. Berrangé Signed-off-by: John Snow --- tests/qemu-iotests/testenv.py| 7 ++- tests/qemu-iotests/testrunner.py | 9 ++--- 2 files

[PATCH v3 00/19] python: 3.14 compatibility and python-qemu-qmp synchronization

2025-09-08 Thread John Snow
or 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 'Chang

Re: [PATCH v2 06/18] python: backport 'qmp-shell: add common_parser()'

2025-09-08 Thread John Snow
On Mon, Sep 8, 2025 at 12:47 PM Daniel P. Berrangé wrote: > > On Wed, Sep 03, 2025 at 01:11:12AM -0400, John Snow wrote: > > Signed-off-by: John Snow > > cherry picked from commit 20a88c2471f37d10520b2409046d59e1d0f1e905 > > Signed-off-by: John Snow > > Duplicate s

[PATCH 16/19] python: ensure QEMUQtestProtocol closes its socket

2025-09-03 Thread John Snow
Signed-off-by: John Snow --- python/qemu/machine/qtest.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/qemu/machine/qtest.py b/python/qemu/machine/qtest.py index 4f5ede85b23..781f674ffaf 100644 --- a/python/qemu/machine/qtest.py +++ b/python/qemu/machine/qtest.py @@ -177,6 +177,8

[PATCH v2 02/18] python: backport 'EventListener: add __repr__ method'

2025-09-03 Thread John Snow
When the object is not stateful, this repr method prints what you'd expect. In cases where there are pending events, the output is augmented to illustrate that. The object itself has no idea if it's "active" or not, so it cannot convey that information. Signed-off-by: John

[PATCH 17/19] iotests/147: ensure temporary sockets are closed before exiting

2025-09-03 Thread John Snow
From: Daniel P. Berrangé This avoids the python resource leak detector from issuing warnings in the iotests. Signed-off-by: Daniel P. Berrangé Signed-off-by: John Snow --- tests/qemu-iotests/147 | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qemu-iotests/147 b/tests/qemu-iotests

[PATCH v2 00/18] python: 3.14 compatibility and python-qemu-qmp synchronization

2025-09-03 Thread John Snow
re subprocesses are cleaned up iotests/check: always enable all python warnings John Snow (12): python: backport 'Change error classes to have better repr methods' python: backport 'EventListener: add __repr__ method' python: backport 'kick event queue on legacy event_pu

[PATCH v2 12/18] python: backport 'avoid creating additional event loops per thread'

2025-09-03 Thread John Snow
new loops created with new_event_loop() so that future calls to get_event_loop() will return the loop already created. Reported-by: Richard W.M. Jones Reported-by: Daniel P. Berrangé Signed-off-by: John Snow cherry picked from commit 21ce2ee4f2df87efe84a27b9c5112487f4670622 cherry

[PATCH v2 16/18] iotests/147: ensure temporary sockets are closed before exiting

2025-09-02 Thread John Snow
From: Daniel P. Berrangé This avoids the python resource leak detector from issuing warnings in the iotests. Signed-off-by: Daniel P. Berrangé Signed-off-by: John Snow --- tests/qemu-iotests/147 | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qemu-iotests/147 b/tests/qemu-iotests

[PATCH v2 10/18] python: backport 'qmp-tui: Do not crash if optional dependencies are not met'

2025-09-02 Thread John Snow
the import statements. Signed-off-by: John Snow cherry picked from commit df520dcacf9a75dd4c82ab1129768de4128b554c Signed-off-by: John Snow --- python/qemu/qmp/qmp_tui.py | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/python/qemu/qmp/qmp_tui.py b/python

[PATCH v2 13/18] python: synchronize qemu.qmp documentation

2025-09-02 Thread John Snow
d "COPYING" instead and are therefore left unchanged. Signed-off-by: John Snow --- python/qemu/qmp/__init__.py | 3 +- python/qemu/qmp/events.py | 35 +++--- python/qemu/qmp/legacy.py | 4 +- python/qemu/qmp/message.py| 10 ++- python/qemu/qmp/models.py |

[PATCH v2 11/18] python: backport 'Remove deprecated get_event_loop calls'

2025-09-02 Thread John Snow
fact one of the erroneous users that should not have been using this function: if there's no running event loop inside of a coroutine, you're in big trouble :) Signed-off-by: John Snow cherry picked from commit aa1ff9907603a3033296027e1bd021133df86ef1 Signed-off-by: John Snow --- pytho

[PATCH v2 17/18] iotests/151: ensure subprocesses are cleaned up

2025-09-02 Thread John Snow
garbage collected. Signed-off-by: Daniel P. Berrangé Signed-off-by: John Snow --- tests/qemu-iotests/151 | 5 + 1 file changed, 5 insertions(+) diff --git a/tests/qemu-iotests/151 b/tests/qemu-iotests/151 index f2ff9c5dac2..06ee3585db9 100755 --- a/tests/qemu-iotests/151 +++ b/tests/qemu-iotests

[PATCH v2 09/18] python: backport 'qmp-shell-wrap: handle missing binary gracefully'

2025-09-02 Thread John Snow
Signed-off-by: John Snow cherry picked from commit 9c889dcbd58817b0c917a9d2dd16161f48ac8203 Signed-off-by: John Snow --- python/qemu/qmp/qmp_shell.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/qemu/qmp/qmp_shell.py b/python/qemu/qmp/qmp_shell.py index 02028e94b5a..c923ff09e1f

[PATCH v2 04/18] python: backport 'protocol: adjust logging name when changing client name'

2025-09-02 Thread John Snow
The client name is mutable, so the logging name should also change to reflect it when it changes. Signed-off-by: John Snow cherry picked from commit e10b73c633ce138ba30bc8beccd2ab31989eaf3d --- python/qemu/qmp/protocol.py | 24 1 file changed, 20 insertions(+), 4

[PATCH v2 18/18] iotests/check: always enable all python warnings

2025-09-02 Thread John Snow
will also display warnings. Signed-off-by: Daniel P. Berrangé Signed-off-by: John Snow --- tests/qemu-iotests/check | 4 1 file changed, 4 insertions(+) diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check index 545f9ec7bdd..d9b7c1d5989 100755 --- a/tests/qemu-iotests/check

[PATCH v2 15/18] python: ensure QEMUQtestProtocol closes its socket

2025-09-02 Thread John Snow
Signed-off-by: John Snow --- python/qemu/machine/qtest.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/qemu/machine/qtest.py b/python/qemu/machine/qtest.py index 4f5ede85b23..781f674ffaf 100644 --- a/python/qemu/machine/qtest.py +++ b/python/qemu/machine/qtest.py @@ -177,6 +177,8

[PATCH v2 08/18] python: backport 'make require() preserve async-ness'

2025-09-02 Thread John Snow
in order to preserve the "async" flag for docs, the require() decorator needs to differentiate based on whether it is decorating a sync or async function and use a different wrapping mechanism accordingly. Phew. Signed-off-by: John Snow cherry picked from commit 40aa9699d619849f528032aa456dd

[PATCH v2 06/18] python: backport 'qmp-shell: add common_parser()'

2025-09-02 Thread John Snow
Signed-off-by: John Snow cherry picked from commit 20a88c2471f37d10520b2409046d59e1d0f1e905 Signed-off-by: John Snow --- python/qemu/qmp/qmp_shell.py | 35 --- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/python/qemu/qmp/qmp_shell.py b/python

[PATCH v2 14/18] iotests: drop compat for old version context manager

2025-09-02 Thread John Snow
From: Daniel P. Berrangé Our minimum python is now 3.9, so back compat with prior python versions is no longer required. Signed-off-by: Daniel P. Berrangé Signed-off-by: John Snow --- tests/qemu-iotests/testenv.py| 7 ++- tests/qemu-iotests/testrunner.py | 9 ++--- 2 files

[PATCH v2 01/18] python: backport 'Change error classes to have better repr methods'

2025-09-02 Thread John Snow
of ExecuteError, the pseudo-field that isn't actually correlated to an input argument can be re-imagined as a read-only property; this forces consistency in the class and makes the repr output more obviously correct. Signed-off-by: John Snow cherry picked from commit afdb7893f3b34212da42

[PATCH v2 05/18] python: backport 'drop Python3.6 workarounds'

2025-09-02 Thread John Snow
Now that the minimum version is 3.7, drop some of the 3.6-specific hacks we've been carrying. A single remaining compatibility hack concerning 3.6's lack of @asynccontextmanager is addressed in the following commit. Signed-off-by: John Snow cherry picked f

[PATCH v2 07/18] python: backport 'feat: allow setting read buffer limit'

2025-09-02 Thread John Snow
as it allows pushing the buffer size up to the guest agent's limit of 48MB per transfer. Signed-off-by: Adam Dorsey cherry picked from commit 9ba6a698344eb3b570fa4864e906c54042824cd6 cherry picked from commit e4d0d3f835d82283ee0e48438d1b154e18303491 [Squashed in linter fixups. --js] Signed-of

[PATCH v2 03/18] python: backport 'kick event queue on legacy event_pull()'

2025-09-02 Thread John Snow
This corrects an oversight in qmp-shell operation where new events will not accumulate in the event queue when pressing "enter" with an empty command buffer, so no new events show up. Reported-by: Jag Raman Signed-off-by: John Snow cherry picked f

Re: [PATCH 00/19] python: 3.14 compatibility and python-qemu-qmp synchronization

2025-09-02 Thread John Snow
On Tue, Sep 2, 2025, 12:54 PM Daniel P. Berrangé wrote: > On Mon, Sep 01, 2025 at 04:26:42PM -0400, John Snow wrote: > > RFC: Should I squash the last two backport patches? One technically > > introduces a regression which breaks our "no regressions in series" > >

[PATCH 19/19] iotests/check: always enable all python warnings

2025-09-02 Thread John Snow
will also display warnings. Signed-off-by: Daniel P. Berrangé Signed-off-by: John Snow --- tests/qemu-iotests/check | 4 1 file changed, 4 insertions(+) diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check index 545f9ec7bdd..d9b7c1d5989 100755 --- a/tests/qemu-iotests/check

[PATCH 00/19] python: 3.14 compatibility and python-qemu-qmp synchronization

2025-09-01 Thread John Snow
nager 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

[PATCH 18/19] iotests/151: ensure subprocesses are cleaned up

2025-09-01 Thread John Snow
garbage collected. Signed-off-by: Daniel P. Berrangé Signed-off-by: John Snow --- tests/qemu-iotests/151 | 5 + 1 file changed, 5 insertions(+) diff --git a/tests/qemu-iotests/151 b/tests/qemu-iotests/151 index f2ff9c5dac2..06ee3585db9 100755 --- a/tests/qemu-iotests/151 +++ b/tests/qemu-iotests

[PATCH 02/19] python: backport 'EventListener: add __repr__ method'

2025-09-01 Thread John Snow
When the object is not stateful, this repr method prints what you'd expect. In cases where there are pending events, the output is augmented to illustrate that. The object itself has no idea if it's "active" or not, so it cannot convey that information. Signed-off-by: John

[PATCH 03/19] python: backport 'kick event queue on legacy event_pull()'

2025-09-01 Thread John Snow
This corrects an oversight in qmp-shell operation where new events will not accumulate in the event queue when pressing "enter" with an empty command buffer, so no new events show up. Reported-by: Jag Raman Signed-off-by: John Snow cherry picked f

[PATCH 06/19] python: backport 'qmp-shell: add common_parser()'

2025-09-01 Thread John Snow
Signed-off-by: John Snow cherry picked from commit 20a88c2471f37d10520b2409046d59e1d0f1e905 Signed-off-by: John Snow --- python/qemu/qmp/qmp_shell.py | 35 --- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/python/qemu/qmp/qmp_shell.py b/python

[PATCH 14/19] python: synchronize qemu.qmp documentation

2025-09-01 Thread John Snow
d "COPYING" instead and are therefore left unchanged. Signed-off-by: John Snow --- python/qemu/qmp/__init__.py | 3 +- python/qemu/qmp/events.py | 35 +++--- python/qemu/qmp/legacy.py | 4 +- python/qemu/qmp/message.py| 10 ++- python/qemu/qmp/models.py |

[PATCH 05/19] python: backport 'drop Python3.6 workarounds'

2025-09-01 Thread John Snow
Now that the minimum version is 3.7, drop some of the 3.6-specific hacks we've been carrying. A single remaining compatibility hack concerning 3.6's lack of @asynccontextmanager is addressed in the following commit. Signed-off-by: John Snow cherry picked f

[PATCH 10/19] python: backport 'qmp-tui: Do not crash if optional dependencies are not met'

2025-09-01 Thread John Snow
the import statements. Signed-off-by: John Snow cherry picked from commit df520dcacf9a75dd4c82ab1129768de4128b554c Signed-off-by: John Snow --- python/qemu/qmp/qmp_tui.py | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/python/qemu/qmp/qmp_tui.py b/python

[PATCH 07/19] python: backport 'feat: allow setting read buffer limit'

2025-09-01 Thread John Snow
as it allows pushing the buffer size up to the guest agent's limit of 48MB per transfer. Signed-off-by: Adam Dorsey cherry picked from commit 9ba6a698344eb3b570fa4864e906c54042824cd6 cherry picked from commit e4d0d3f835d82283ee0e48438d1b154e18303491 [Squashed in linter fixups. --js] Signed-of

[PATCH 15/19] iotests: drop compat for old version context manager

2025-09-01 Thread John Snow
From: Daniel P. Berrangé Our minimum python is now 3.9, so back compat with prior python versions is no longer required. Signed-off-by: Daniel P. Berrangé Signed-off-by: John Snow --- tests/qemu-iotests/testenv.py| 7 ++- tests/qemu-iotests/testrunner.py | 9 ++--- 2 files

[PATCH 08/19] python: backport 'make require() preserve async-ness'

2025-09-01 Thread John Snow
in order to preserve the "async" flag for docs, the require() decorator needs to differentiate based on whether it is decorating a sync or async function and use a different wrapping mechanism accordingly. Phew. Signed-off-by: John Snow cherry picked from commit 40aa9699d619849f528032aa456dd

[PATCH 01/19] python: backport 'Change error classes to have better repr methods'

2025-09-01 Thread John Snow
of ExecuteError, the pseudo-field that isn't actually correlated to an input argument can be re-imagined as a read-only property; this forces consistency in the class and makes the repr output more obviously correct. Signed-off-by: John Snow cherry picked from commit afdb7893f3b34212da42

[PATCH 04/19] python: backport 'protocol: adjust logging name when changing client name'

2025-09-01 Thread John Snow
The client name is mutable, so the logging name should also change to reflect it when it changes. Signed-off-by: John Snow cherry picked from commit e10b73c633ce138ba30bc8beccd2ab31989eaf3d --- python/qemu/qmp/protocol.py | 24 1 file changed, 20 insertions(+), 4

[PATCH 12/19] python: backport '*really* remove get_event_loop'

2025-09-01 Thread John Snow
cleanup mechanisms in __del__ to match. Reported-by: Richard W.M. Jones Reported-by: Daniel P. Berrangé Signed-off-by: John Snow cherry picked from commit 21ce2ee4f2df87efe84a27b9c5112487f4670622 Signed-off-by: John Snow --- python/qemu/qmp/legacy.py | 47

[PATCH 13/19] python: backport 'python: avoid creating additional event loops per thread'

2025-09-01 Thread John Snow
suppresses the deprecation warning in Python<=3.13. This time, however, additionally register new loops created with new_event_loop() so that future calls to get_event_loop() will return the loop already created. Signed-off-by: John Snow cherry picked from commit c08fb82b38212956ccffc03fc6d015c3979f

[PATCH 11/19] python: backport 'Remove deprecated get_event_loop calls'

2025-09-01 Thread John Snow
fact one of the erroneous users that should not have been using this function: if there's no running event loop inside of a coroutine, you're in big trouble :) Signed-off-by: John Snow cherry picked from commit aa1ff9907603a3033296027e1bd021133df86ef1 Signed-off-by: John Snow --- pytho

[PATCH 09/19] python: backport 'qmp-shell-wrap: handle missing binary gracefully'

2025-09-01 Thread John Snow
Signed-off-by: John Snow cherry picked from commit 9c889dcbd58817b0c917a9d2dd16161f48ac8203 Signed-off-by: John Snow --- python/qemu/qmp/qmp_shell.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/qemu/qmp/qmp_shell.py b/python/qemu/qmp/qmp_shell.py index 02028e94b5a..c923ff09e1f

Re: [PULL 0/2] Python patches

2025-08-19 Thread John Snow
On Wed, Aug 20, 2025 at 12:58 AM John Snow wrote: > > The following changes since commit 5836af0783213b9355a6bbf85d9e6bc4c9c9363f: > > Merge tag 'uefi-20250812-pull-request' of https://gitlab.com/kraxel/qemu > into staging (2025-08-13 15:19:29 -0400) > > are ava

[PULL 1/2] python: Replace asyncio.get_event_loop for Python 3.14

2025-08-19 Thread John Snow
lso: https://docs.python.org/3.14/whatsnew/3.14.html#id7 Thanks: Miro Hrončok, Daniel P. Berrangé Signed-off-by: Richard W.M. Jones Reviewed-by: John Snow Signed-off-by: John Snow --- python/qemu/qmp/legacy.py | 5 - python/qemu/qmp/qmp_tui.py | 2 +- python/tests/protocol.py | 2 +- 3 files changed, 6

Re: [PATCH 14/14] iotests/check: always enable all python warnings

2025-08-19 Thread John Snow
ting the env variable further ensures that any python child > processes will also display warnings. > > Signed-off-by: Daniel P. Berrangé Reviewed-by: John Snow Thanks for this one. I sent a PR for the first two patches, I will stage everything else. > --- > tests/qemu-iotests

[PULL 2/2] python: avoid deprecation warning with get_event_loop

2025-08-19 Thread John Snow
: Daniel P. Berrangé Reviewed-by: Eric Blake Reviewed-by: John Snow Signed-off-by: John Snow --- python/qemu/qmp/legacy.py | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/python/qemu/qmp/legacy.py b/python/qemu/qmp/legacy.py index e11d05afbd6..c6ab3edc867 100644 --- a

[PULL 0/2] Python patches

2025-08-19 Thread John Snow
The following changes since commit 5836af0783213b9355a6bbf85d9e6bc4c9c9363f: Merge tag 'uefi-20250812-pull-request' of https://gitlab.com/kraxel/qemu into staging (2025-08-13 15:19:29 -0400) are available in the Git repository at: https://gitlab.com/jsnow/qemu.git tags/python-pull-request

Re: [PATCH 13/14] iotests/151: ensure subprocesses are cleaned up

2025-08-19 Thread John Snow
On Tue, Jul 15, 2025 at 10:32 AM Daniel P. Berrangé wrote: > > The iotest 151 creates a bunch of subprocesses, with their stdout > connected to a pipe but never reads any data from them and does > not gurantee the processes are killed on cleanup. > > This triggers resource leak warnings from pytho

Re: [PATCH 12/14] iotests/147: ensure temporary sockets are closed before exiting

2025-08-19 Thread John Snow
On Tue, Jul 15, 2025 at 10:32 AM Daniel P. Berrangé wrote: > > This avoids the python resource leak detector from issuing warnings > in the iotests. > > Signed-off-by: Daniel P. Berrangé Reviewed-by: John Snow > --- > tests/qemu-iotests/147 | 1 + > 1 file changed,

Re: [PATCH] tests, scripts: Don't import print_function from __future__

2025-08-19 Thread John Snow
stros are all on Python 3. In any > case these are only run as part of "make check-tcg", not by > end-users. > > Commit created with: > > sed -i -e '/import print_function/d' $(git grep -l 'from __future__') > > Signed-off-by: Peter Maydell

Re: [PATCH 11/14] python: ensure QEMUQtestProtocol closes its socket

2025-08-19 Thread John Snow
avoid this leak warnnig. Huh. I wonder if that's a false positive, or if it's actually true? > > Signed-off-by: Daniel P. Berrangé Well, either way... Reviewed-by: John Snow > --- > python/qemu/machine/qtest.py | 2 ++ > 1 file changed, 2 insertions(+) > > diff --gi

Re: [PATCH 10/14] functional: always enable all python warnings

2025-08-19 Thread John Snow
On Tue, Jul 15, 2025 at 11:15 AM Thomas Huth wrote: > > On 15/07/2025 16.30, Daniel P. Berrangé wrote: > > Of most importance is that this gives us a heads-up if anything > > we rely on has been deprecated. The default python behaviour > > only emits a warning if triggered from __main__ which is v

Re: [PATCH 07/14] iotests: drop compat for old version context manager

2025-08-19 Thread John Snow
On Tue, Jul 15, 2025 at 10:31 AM Daniel P. Berrangé wrote: > > Our minimum python is now 3.9, so back compat with prior > python versions is no longer required. > > Signed-off-by: Daniel P. Berrangé Reviewed-by: John Snow

Re: [PATCH 01/14] python: Replace asyncio.get_event_loop for Python 3.14

2025-08-19 Thread John Snow
On Tue, Aug 19, 2025 at 3:51 PM Daniel P. Berrangé wrote: > > On Tue, Aug 19, 2025 at 03:47:50PM -0400, John Snow wrote: > > On Tue, Jul 15, 2025 at 10:30 AM Daniel P. Berrangé > > wrote: > > > > > > From: Richard W.M. Jones > > > > > >

Re: [PATCH 06/14] python: drop 'create_task' back compat helper

2025-08-19 Thread John Snow
On Tue, Jul 15, 2025 at 10:31 AM Daniel P. Berrangé wrote: > > Our minimum python is now 3.9, so back compat with python > 3.6 is no longer required. > > Signed-off-by: Daniel P. Berrangé Reviewed-by: John Snow > --- > python/qemu/qmp/protocol.py | 7 +++ > py

Re: [PATCH 05/14] python: drop 'asyncio_run' back compat helper

2025-08-19 Thread John Snow
On Tue, Jul 15, 2025 at 10:31 AM Daniel P. Berrangé wrote: > > Our minimum python is now 3.9, so back compat with python > 3.6 is no longer required. > > Signed-off-by: Daniel P. Berrangé Reviewed-by: John Snow > --- > python/qemu/qmp/util.py | 19 --

Re: [PATCH 04/14] python: drop 'wait_closed' back compat helper

2025-08-19 Thread John Snow
On Tue, Jul 15, 2025 at 10:31 AM Daniel P. Berrangé wrote: > > Our minimum python is now 3.9, so back compat with python > 3.6 is no longer required. > > Signed-off-by: Daniel P. Berrangé Reviewed-by: John Snow > --- > python/qemu/qmp/protocol.py | 3 +-- > python/q

Re: [PATCH 03/14] python: drop 'is_closing' back compat helper

2025-08-19 Thread John Snow
On Tue, Jul 15, 2025 at 10:31 AM Daniel P. Berrangé wrote: > > Our minimum python is now 3.9, so back compat with python > 3.6 is no longer required. > > Signed-off-by: Daniel P. Berrangé Reviewed-by: John Snow Another thing that happened in the standalone tree, but not in

  1   2   3   4   5   6   7   8   9   10   >