Skip to contentSkip to conversation

doc: Sphinx.override_domain() deprecated

PATCH New Heinrich Schuchardt 2 participants 2 messages Oct 6, 2020 – Oct 14, 2020

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 doc: Sphinx.override_domain() deprecated

Sphinx.override_domain() is deprecated since Sphinx 1.8 and removed in Sphinx 3.

Use Sphinx.add_domain(, override=True) instead.

---
v2:

	Ubuntu 18.04 still uses Sphinx 1.6.7
	So use the same version check as Linux.
---
 doc/sphinx/cdomain.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
doc/sphinx/cdomain.py +4 -1
index cf13ff3a65..e0c762caa6 100644
@@ -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__,

--
2.28.0

#1 lore raw

PATCH v2 1/1 doc: Sphinx.override_domain() deprecated

Quoted 6 lines · Heinrich Schuchardt

Sphinx.override_domain() is deprecated since Sphinx 1.8 and removed in Sphinx 3.

Use Sphinx.add_domain(, override=True) instead.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20201014/a94148bc/attachment.sig>