From: Kefu Chai Date: Tue, 24 Jun 2025 23:49:25 +0000 (+0800) Subject: doc/_ext: import status_iterator from sphinx.util.display X-Git-Tag: testing/wip-vshankar-testing-20250721.155223-debug~62^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=29f15aed77577565b5cdae8b2041cb278fc5d9ed;p=ceph-ci.git doc/_ext: import status_iterator from sphinx.util.display Import status_iterator from sphinx.util.display with fallback to sphinx.util for backward compatibility. The status_iterator function was moved from sphinx.util to sphinx.util.display in Sphinx 6.1 and the old import path was removed in Sphinx 8.0. See https://www.sphinx-doc.org/en/master/extdev/deprecated.html. Since our CI and packaging environments use older Sphinx versions (Ubuntu Jammy ships 4.3.2, CentOS ships 3.4.3), we need to maintain compatibility with both old and new Sphinx versions. This change ensures the documentation builds successfully across all supported Sphinx versions by attempting the new import path first, then falling back to the legacy path if needed. Signed-off-by: Kefu Chai --- diff --git a/doc/_ext/ceph_confval.py b/doc/_ext/ceph_confval.py index 3a1a9b8abea..c5e212173f1 100644 --- a/doc/_ext/ceph_confval.py +++ b/doc/_ext/ceph_confval.py @@ -11,7 +11,11 @@ from docutils.statemachine import StringList from sphinx import addnodes from sphinx.directives import ObjectDescription from sphinx.locale import _ -from sphinx.util import logging, status_iterator, ws_re +from sphinx.util import logging, ws_re +try: + from sphinx.util.display import status_iterator +except ImportError: + from sphinx.util import status_iterator from sphinx.util.docutils import switch_source_input, SphinxDirective from sphinx.util.docfields import Field from sphinx.util.nodes import make_id