docs: cdomain.py: get rid of a warning since version 1.8
authorMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Thu, 23 May 2019 10:43:43 +0000 (07:43 -0300)
committerJonathan Corbet <corbet@lwn.net>
Wed, 29 May 2019 21:47:32 +0000 (15:47 -0600)
There's a new warning about a deprecation function. Add a
logic at cdomain.py to avoid that.

Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Documentation/sphinx/cdomain.py

index cf13ff3a656cdeb60f4c56e1fc5f52d701c8256a..cbac8e608dc4df7c01a351ef1178ef3697b01209 100644 (file)
@@ -48,7 +48,10 @@ major, minor, patch = sphinx.version_info[:3]
 
 def setup(app):
 
-    app.override_domain(CDomain)
+    if (major == 1 and minor < 8):
+        app.override_domain(CDomain)
+    else:
+        app.add_domain(CDomain, override=True)
 
     return dict(
         version = __version__,