* [PULL 0/3] QAPI patches patches for 2023-10-19
@ 2023-10-19 14:48 Markus Armbruster
2023-10-19 14:48 ` [PULL 1/3] qapi: re-establish linting baseline Markus Armbruster
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Markus Armbruster @ 2023-10-19 14:48 UTC (permalink / raw)
To: qemu-devel; +Cc: stefanha
The following changes since commit deaca3fd30d3a8829160f8d3705d65ad83176800:
Merge tag 'pull-vfio-20231018' of https://github.com/legoater/qemu into staging (2023-10-18 06:21:15 -0400)
are available in the Git repository at:
https://repo.or.cz/qemu/armbru.git tags/pull-qapi-2023-10-19
for you to fetch changes up to e307a8174bb876ba0ac91cf1c2ced01ec4374af9:
qapi: provide a friendly string representation of QAPI classes (2023-10-19 07:21:37 +0200)
----------------------------------------------------------------
QAPI patches patches for 2023-10-19
----------------------------------------------------------------
Daniel P. Berrangé (1):
qapi: provide a friendly string representation of QAPI classes
John Snow (1):
qapi: re-establish linting baseline
Markus Armbruster (1):
qapi: Belatedly update CompatPolicy documentation for unstable
qapi/compat.json | 4 ++--
scripts/qapi/gen.py | 2 +-
scripts/qapi/parser.py | 5 +++--
scripts/qapi/schema.py | 5 +++++
4 files changed, 11 insertions(+), 5 deletions(-)
--
2.41.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PULL 1/3] qapi: re-establish linting baseline
2023-10-19 14:48 [PULL 0/3] QAPI patches patches for 2023-10-19 Markus Armbruster
@ 2023-10-19 14:48 ` Markus Armbruster
2023-10-19 14:48 ` [PULL 2/3] qapi: Belatedly update CompatPolicy documentation for unstable Markus Armbruster
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Markus Armbruster @ 2023-10-19 14:48 UTC (permalink / raw)
To: qemu-devel; +Cc: stefanha, John Snow, Philippe Mathieu-Daudé
From: John Snow <jsnow@redhat.com>
Some very minor housekeeping to make the linters happy once more.
Signed-off-by: John Snow <jsnow@redhat.com>
Message-ID: <20231004230532.3002201-4-jsnow@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
scripts/qapi/gen.py | 2 +-
scripts/qapi/parser.py | 5 +++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/scripts/qapi/gen.py b/scripts/qapi/gen.py
index bf5716b5f3..5412716617 100644
--- a/scripts/qapi/gen.py
+++ b/scripts/qapi/gen.py
@@ -13,8 +13,8 @@
from contextlib import contextmanager
import os
-import sys
import re
+import sys
from typing import (
Dict,
Iterator,
diff --git a/scripts/qapi/parser.py b/scripts/qapi/parser.py
index 22e7bcc4b1..bf31018aef 100644
--- a/scripts/qapi/parser.py
+++ b/scripts/qapi/parser.py
@@ -22,6 +22,7 @@
Dict,
List,
Mapping,
+ Match,
Optional,
Set,
Union,
@@ -563,11 +564,11 @@ def end_comment(self) -> None:
self._switch_section(QAPIDoc.NullSection(self._parser))
@staticmethod
- def _match_at_name_colon(string: str):
+ def _match_at_name_colon(string: str) -> Optional[Match[str]]:
return re.match(r'@([^:]*): *', string)
@staticmethod
- def _match_section_tag(string: str):
+ def _match_section_tag(string: str) -> Optional[Match[str]]:
return re.match(r'(Returns|Since|Notes?|Examples?|TODO): *', string)
def _append_body_line(self, line: str) -> None:
--
2.41.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PULL 2/3] qapi: Belatedly update CompatPolicy documentation for unstable
2023-10-19 14:48 [PULL 0/3] QAPI patches patches for 2023-10-19 Markus Armbruster
2023-10-19 14:48 ` [PULL 1/3] qapi: re-establish linting baseline Markus Armbruster
@ 2023-10-19 14:48 ` Markus Armbruster
2023-10-19 14:48 ` [PULL 3/3] qapi: provide a friendly string representation of QAPI classes Markus Armbruster
2023-10-20 16:06 ` [PULL 0/3] QAPI patches patches for 2023-10-19 Stefan Hajnoczi
3 siblings, 0 replies; 5+ messages in thread
From: Markus Armbruster @ 2023-10-19 14:48 UTC (permalink / raw)
To: qemu-devel; +Cc: stefanha, Philippe Mathieu-Daudé
Commit 57df0dff1a1 (qapi: Extend -compat to set policy for unstable
interfaces) neglected to update the "Limitation" paragraph to mention
feature 'unstable' in addition to feature 'deprecated'. Do that now.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20231009110449.4015601-1-armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
qapi/compat.json | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/qapi/compat.json b/qapi/compat.json
index f4c19837eb..42034d9368 100644
--- a/qapi/compat.json
+++ b/qapi/compat.json
@@ -43,8 +43,8 @@
# This is intended for testing users of the management interfaces.
#
# Limitation: covers only syntactic aspects of QMP, i.e. stuff tagged
-# with feature 'deprecated'. We may want to extend it to cover
-# semantic aspects and CLI.
+# with feature 'deprecated' or 'unstable'. We may want to extend it
+# to cover semantic aspects and CLI.
#
# Limitation: deprecated-output policy @hide is not implemented for
# enumeration values. They behave the same as with policy @accept.
--
2.41.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PULL 3/3] qapi: provide a friendly string representation of QAPI classes
2023-10-19 14:48 [PULL 0/3] QAPI patches patches for 2023-10-19 Markus Armbruster
2023-10-19 14:48 ` [PULL 1/3] qapi: re-establish linting baseline Markus Armbruster
2023-10-19 14:48 ` [PULL 2/3] qapi: Belatedly update CompatPolicy documentation for unstable Markus Armbruster
@ 2023-10-19 14:48 ` Markus Armbruster
2023-10-20 16:06 ` [PULL 0/3] QAPI patches patches for 2023-10-19 Stefan Hajnoczi
3 siblings, 0 replies; 5+ messages in thread
From: Markus Armbruster @ 2023-10-19 14:48 UTC (permalink / raw)
To: qemu-devel; +Cc: stefanha, Daniel P. Berrangé, Philippe Mathieu-Daudé
From: Daniel P. Berrangé <berrange@redhat.com>
If printing a QAPI schema object for debugging we get the classname and
a hex value for the instance:
<qapi.schema.QAPISchemaEnumType object at 0x7f0ab4c2dad0>
<qapi.schema.QAPISchemaObjectType object at 0x7f0ab4c2dd90>
<qapi.schema.QAPISchemaArrayType object at 0x7f0ab4c2df90>
With this change we instead get the classname and the human friendly
name of the QAPI type instance:
<QAPISchemaEnumType:CpuS390State at 0x7f0ab4c2dad0>
<QAPISchemaObjectType:CpuInfoS390 at 0x7f0ab4c2dd90>
<QAPISchemaArrayType:CpuInfoFastList at 0x7f0ab4c2df90>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <20231018120500.2028642-1-berrange@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
[Conditional swapped to avoid negation]
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
[Tweaked to mollify pylint]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
scripts/qapi/schema.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/scripts/qapi/schema.py b/scripts/qapi/schema.py
index 231ebf61ba..d739e558e9 100644
--- a/scripts/qapi/schema.py
+++ b/scripts/qapi/schema.py
@@ -73,6 +73,11 @@ def __init__(self, name: str, info, doc, ifcond=None, features=None):
self.features = features or []
self._checked = False
+ def __repr__(self):
+ if self.name is None:
+ return "<%s at 0x%x>" % (type(self).__name__, id(self))
+ return "<%s:%s at 0x%x>" % type(self).__name__, self.name, id(self)
+
def c_name(self):
return c_name(self.name)
--
2.41.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PULL 0/3] QAPI patches patches for 2023-10-19
2023-10-19 14:48 [PULL 0/3] QAPI patches patches for 2023-10-19 Markus Armbruster
` (2 preceding siblings ...)
2023-10-19 14:48 ` [PULL 3/3] qapi: provide a friendly string representation of QAPI classes Markus Armbruster
@ 2023-10-20 16:06 ` Stefan Hajnoczi
3 siblings, 0 replies; 5+ messages in thread
From: Stefan Hajnoczi @ 2023-10-20 16:06 UTC (permalink / raw)
To: Markus Armbruster; +Cc: qemu-devel, stefanha
[-- Attachment #1: Type: text/plain, Size: 115 bytes --]
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/8.2 for any user-visible changes.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-10-20 16:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-19 14:48 [PULL 0/3] QAPI patches patches for 2023-10-19 Markus Armbruster
2023-10-19 14:48 ` [PULL 1/3] qapi: re-establish linting baseline Markus Armbruster
2023-10-19 14:48 ` [PULL 2/3] qapi: Belatedly update CompatPolicy documentation for unstable Markus Armbruster
2023-10-19 14:48 ` [PULL 3/3] qapi: provide a friendly string representation of QAPI classes Markus Armbruster
2023-10-20 16:06 ` [PULL 0/3] QAPI patches patches for 2023-10-19 Stefan Hajnoczi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).