qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] docs/sphinx: fix compatibility with sphinx < 1.8


From: Thomas Huth
Subject: Re: [PATCH] docs/sphinx: fix compatibility with sphinx < 1.8
Date: Tue, 4 Jan 2022 09:10:55 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0

On 04/01/2022 08.46, marcandre.lureau@redhat.com wrote:
From: Marc-André Lureau <marcandre.lureau@redhat.com>

SphinxDirective was added with sphinx 1.8 (2018-09-13).

Reported-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
  docs/sphinx/fakedbusdoc.py | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/docs/sphinx/fakedbusdoc.py b/docs/sphinx/fakedbusdoc.py
index a680b257547f..d2c507904654 100644
--- a/docs/sphinx/fakedbusdoc.py
+++ b/docs/sphinx/fakedbusdoc.py
@@ -7,12 +7,12 @@
  # 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 sphinx.util.docutils import SphinxDirective
  from typing import Any, Dict
-class FakeDBusDocDirective(SphinxDirective):
+class FakeDBusDocDirective(Directive):
      has_content = True
      required_arguments = 1

Thanks, that fixes my issue, indeed!

Tested-by: Thomas Huth <thuth@redhat.com>

I wonder whether we could turn such sphinx warnings during the configure phase into a hard failure so that such bugs would fail in the CI instead of getting merge without notice...?

 Thomas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]