From: Markus Armbruster <armbru@redhat.com>
To: John Snow <jsnow@redhat.com>
Cc: qemu-devel@nongnu.org, "Ani Sinha" <anisinha@redhat.com>,
"Michael Roth" <michael.roth@amd.com>,
"Igor Mammedov" <imammedo@redhat.com>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Eric Blake" <eblake@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@mailo.com>,
"Mauro Carvalho Chehab" <mchehab+huawei@kernel.org>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Pierrick Bouvier" <pierrick.bouvier@oss.qualcomm.com>,
"Richard Henderson" <richard.henderson@linaro.org>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
linux-edac@vger.kernel.org, "Cleber Rosa" <crosa@redhat.com>
Subject: Re: [PATCH v3 07/16] qapi/docs: add "Intro" section
Date: Tue, 09 Jun 2026 12:58:56 +0200 [thread overview]
Message-ID: <87tsrcou8f.fsf@pond.sub.org> (raw)
In-Reply-To: <20260603032201.993015-8-jsnow@redhat.com> (John Snow's message of "Tue, 2 Jun 2026 23:21:52 -0400")
John Snow <jsnow@redhat.com> writes:
> This patch adds an "Intro" doc section, intended to eventually replace
> the "Plain" doc section alongside a forthcoming "Details" section.
>
> For now, this section is not actually instantiated or used, but
> subsequent patches will slowly convert the leading introductory sections
> of QAPIDoc documentation to use this new section.
>
> A main motivation of this series of changes is to more explicitly
> delineate the "Introductory" documentation for each QAPI definition for
> the sake of the inliner. When inlining members, examples, and details
> from multiple QAPIDoc sections, we will want to omit the "Introductory"
> text from inlined definitions while keeping notes, caution boxes,
> examples, and so on. This new section facilitates that.
>
> Signed-off-by: John Snow <jsnow@redhat.com>
> ---
> docs/sphinx/qapidoc.py | 2 +-
> scripts/qapi/parser.py | 3 ++-
> 2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/docs/sphinx/qapidoc.py b/docs/sphinx/qapidoc.py
> index c2f09bac16c..1f7c15b7075 100644
> --- a/docs/sphinx/qapidoc.py
> +++ b/docs/sphinx/qapidoc.py
> @@ -368,7 +368,7 @@ def visit_sections(self, ent: QAPISchemaDefinition) -> None:
> for i, section in enumerate(sections):
> section.text = self.reformat_arobase(section.text)
>
> - if section.kind == QAPIDoc.Kind.PLAIN:
> + if section.kind.name in ("PLAIN", "INTRO"):
Is the change from QAPIDoc.Kind.FOO to "FOO" just for brevity, or is
something going on I don't understand?
> self.visit_paragraph(section)
> elif section.kind == QAPIDoc.Kind.MEMBER:
> assert isinstance(section, QAPIDoc.ArgSection)
> diff --git a/scripts/qapi/parser.py b/scripts/qapi/parser.py
> index d8068bb1bf6..97e7dacb0fd 100644
> --- a/scripts/qapi/parser.py
> +++ b/scripts/qapi/parser.py
> @@ -681,6 +681,7 @@ class Kind(enum.Enum):
> ERRORS = 4
> SINCE = 5
> TODO = 6
> + INTRO = 7
>
> @staticmethod
> def from_string(kind: str) -> 'QAPIDoc.Kind':
> @@ -748,7 +749,7 @@ def has_features(self) -> bool:
> def end(self) -> None:
> for section in self.all_sections:
> section.text = section.text.strip('\n')
> - if section.kind != QAPIDoc.Kind.PLAIN and section.text == '':
> + if not (section.kind.name in ("INTRO", "PLAIN") or section.text):
> raise QAPISemError(
> section.info, "text required after '%s:'" % section.kind)
next prev parent reply other threads:[~2026-06-09 10:59 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-03 3:21 [PATCH v3 00/16] qapi: add formal "intro" section John Snow
2026-06-03 3:21 ` [PATCH v3 01/16] python: temporarily restrict max mypy version John Snow
2026-06-03 3:21 ` [PATCH v3 02/16] tests/qapi: generate output in source order John Snow
2026-06-03 3:21 ` [PATCH v3 03/16] qapi/docs: remove unused QAPIDoc subsection members John Snow
2026-06-03 3:21 ` [PATCH v3 04/16] qapi/docs: add has_features property John Snow
2026-06-03 3:21 ` [PATCH v3 05/16] qapi/docs: make remaining subsection members "private" John Snow
2026-06-03 3:21 ` [PATCH v3 06/16] qapi/docs: fix comment phrasing John Snow
2026-06-03 3:21 ` [PATCH v3 07/16] qapi/docs: add "Intro" section John Snow
2026-06-09 10:58 ` Markus Armbruster [this message]
2026-06-09 18:06 ` John Snow
2026-06-03 3:21 ` [PATCH v3 08/16] qapi/parser: move _insert_near_kind() method John Snow
2026-06-03 3:21 ` [PATCH v3 09/16] qapi/docs: adjust stub member insertion algorithm John Snow
2026-06-03 11:27 ` Markus Armbruster
2026-06-04 19:07 ` John Snow
2026-06-09 13:32 ` Markus Armbruster
2026-06-09 18:44 ` John Snow
2026-06-03 3:21 ` [PATCH v3 10/16] qapi/docs: remove implicit Plain section John Snow
2026-06-03 3:21 ` [PATCH v3 11/16] qapi/docs: add rendering for INTRO sections John Snow
2026-06-09 13:36 ` Markus Armbruster
2026-06-09 18:51 ` John Snow
2026-06-03 3:21 ` [PATCH v3 12/16] qapi/docs: add "Intro" section parsing John Snow
2026-06-09 13:39 ` Markus Armbruster
2026-06-09 18:57 ` John Snow
2026-06-03 3:21 ` [PATCH v3 13/16] qapi: convert intro sections for accelerator.json John Snow
2026-06-03 3:21 ` [PATCH v3 14/16] qapi: convert intro sections for acpi-hest.json John Snow
2026-06-03 3:22 ` [PATCH v3 15/16] qapi: convert intro sections for acpi.json John Snow
2026-06-03 3:22 ` [PATCH v3 16/16] qapi: convert intro sections for audio.json John Snow
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87tsrcou8f.fsf@pond.sub.org \
--to=armbru@redhat.com \
--cc=anisinha@redhat.com \
--cc=crosa@redhat.com \
--cc=eblake@redhat.com \
--cc=imammedo@redhat.com \
--cc=jsnow@redhat.com \
--cc=kraxel@redhat.com \
--cc=linux-edac@vger.kernel.org \
--cc=marcandre.lureau@redhat.com \
--cc=mchehab+huawei@kernel.org \
--cc=michael.roth@amd.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@linaro.org \
--cc=philmd@mailo.com \
--cc=pierrick.bouvier@oss.qualcomm.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox