Commit 01657b6932 for qemu.org
commit 01657b6932909baef99202efa54815777d16a5b8
Author: John Snow <jsnow@redhat.com>
Date: Tue Aug 25 17:58:50 2026 -0400
sphinx: drop fakedbusdoc
Now that we rely on a sufficiently modern Sphinx, we no longer need a
stub doc for dbus.
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-ID: <20260825215851.1780608-16-jsnow@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
diff --git a/docs/conf.py b/docs/conf.py
index cded047b53..914bae67d9 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -59,6 +59,7 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
+ 'dbusdoc',
'depfile',
'hxtool',
'kerneldoc',
@@ -67,12 +68,6 @@
'qmp_lexer',
]
-if sphinx.version_info[:3] > (4, 0, 0):
- tags.add('sphinx4')
- extensions += ['dbusdoc']
-else:
- extensions += ['fakedbusdoc']
-
# Add any paths that contain templates here, relative to this directory.
templates_path = [os.path.join(qemu_docdir, '_templates')]
diff --git a/docs/interop/dbus-display.rst b/docs/interop/dbus-display.rst
index 87648e91dc..c87a04c969 100644
--- a/docs/interop/dbus-display.rst
+++ b/docs/interop/dbus-display.rst
@@ -18,16 +18,4 @@ QEMU also implements the standard interfaces, such as
:local:
:depth: 1
-.. only:: sphinx4
-
- .. dbus-doc:: ui/dbus-display1.xml
-
-.. only:: not sphinx4
-
- .. warning::
- Sphinx 4 is required to build D-Bus documentation.
-
- This is the content of ``ui/dbus-display1.xml``:
-
- .. literalinclude:: ../../ui/dbus-display1.xml
- :language: xml
+.. dbus-doc:: ui/dbus-display1.xml
diff --git a/docs/interop/dbus-vmstate.rst b/docs/interop/dbus-vmstate.rst
index 5fb3f279e2..5f8c6d125d 100644
--- a/docs/interop/dbus-vmstate.rst
+++ b/docs/interop/dbus-vmstate.rst
@@ -23,16 +23,4 @@ dbus-vmstate object can be configured with the expected list of
helpers by setting its ``id-list`` property, with a comma-separated
``Id`` list.
-.. only:: sphinx4
-
- .. dbus-doc:: backends/dbus-vmstate1.xml
-
-.. only:: not sphinx4
-
- .. warning::
- Sphinx 4 is required to build D-Bus documentation.
-
- This is the content of ``backends/dbus-vmstate1.xml``:
-
- .. literalinclude:: ../../backends/dbus-vmstate1.xml
- :language: xml
+.. dbus-doc:: backends/dbus-vmstate1.xml
diff --git a/docs/interop/dbus-vnc.rst b/docs/interop/dbus-vnc.rst
index d2b77978f6..5ea4fd5718 100644
--- a/docs/interop/dbus-vnc.rst
+++ b/docs/interop/dbus-vnc.rst
@@ -11,16 +11,4 @@ Objects are exported under ``/org/qemu/Vnc1/``.
:local:
:depth: 1
-.. only:: sphinx4
-
- .. dbus-doc:: tools/qemu-vnc/qemu-vnc1.xml
-
-.. only:: not sphinx4
-
- .. warning::
- Sphinx 4 is required to build D-Bus documentation.
-
- This is the content of ``tools/qemu-vnc/qemu-vnc1.xml``:
-
- .. literalinclude:: ../../tools/qemu-vnc/qemu-vnc1.xml
- :language: xml
+.. dbus-doc:: tools/qemu-vnc/qemu-vnc1.xml
diff --git a/docs/sphinx/fakedbusdoc.py b/docs/sphinx/fakedbusdoc.py
deleted file mode 100644
index 2d2e6ef640..0000000000
--- a/docs/sphinx/fakedbusdoc.py
+++ /dev/null
@@ -1,30 +0,0 @@
-# D-Bus XML documentation extension, compatibility gunk for <sphinx4
-#
-# Copyright (C) 2021, Red Hat Inc.
-#
-# SPDX-License-Identifier: LGPL-2.1-or-later
-#
-# Author: Marc-André Lureau <marcandre.lureau@redhat.com>
-"""dbus-doc is a Sphinx extension that provides documentation from D-Bus XML."""
-
-from docutils.parsers.rst import Directive
-from sphinx.application import Sphinx
-from typing import Any, Dict
-
-
-class FakeDBusDocDirective(Directive):
- has_content = True
- required_arguments = 1
-
- def run(self):
- return []
-
-
-def setup(app: Sphinx) -> Dict[str, Any]:
- """Register a fake dbus-doc directive with Sphinx"""
- app.add_directive("dbus-doc", FakeDBusDocDirective)
-
- return dict(
- parallel_read_safe = True,
- parallel_write_safe = True
- )