From: Jonathan Corbet Date: Thu, 19 Jun 2025 21:17:39 +0000 (-0600) Subject: docs: sphinx: avoid using the deprecated node.set_class() X-Git-Tag: io_uring-6.17-20250815~111^2~83 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=4a1dd6643d8ef2c1655f308532fb7d605afa8be4;p=linux-block.git docs: sphinx: avoid using the deprecated node.set_class() Docutils emits a deprecation warning when the set_class() element method is used; that warning disappears into the ether, but it also causes a crash with docutils 0.19. Avoid the deprecated function and just append directly to the "classes" attribute like the documentation says instead. Reported-by: Akira Yokosawa Tested-by: Akira Yokosawa Closes: https://lore.kernel.org/de7bae91-3200-481f-9db2-c0dc382c91dd@gmail.com/ Fixes: d6d1df92c25f ("docs: automarkup: Mark up undocumented entities too") Signed-off-by: Jonathan Corbet --- diff --git a/Documentation/sphinx/automarkup.py b/Documentation/sphinx/automarkup.py index e67eb8e19c22..563033f764bb 100644 --- a/Documentation/sphinx/automarkup.py +++ b/Documentation/sphinx/automarkup.py @@ -240,7 +240,7 @@ def add_and_resolve_xref(app, docname, domain, reftype, target, contnode=None): # mark it as a broken xref # if contnode: - contnode.set_class("broken_xref") + contnode['classes'].append("broken_xref") return contnode #