From 770a4bbb4a8f33179384e22e15940168468ab31a Mon Sep 17 00:00:00 2001 From: Thomas Bechtold Date: Mon, 6 May 2024 17:28:08 +0200 Subject: [PATCH] Fix _pseudo_parse_arglist from Sphinx sphinx.domain.python got split[0] into multiple modules so make the sphinx extension work with older and newer Sphinx versions. [0] https://github.com/sphinx-doc/sphinx/commit/e9dcfebcf9f3cb5db6a47448e10e9b61c5abc416 Change-Id: I2dfb085cd382e277562f4dcb3d903729dc388fd4 --- jenkins_jobs/sphinx/yaml.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/jenkins_jobs/sphinx/yaml.py b/jenkins_jobs/sphinx/yaml.py index f22714a4c..534a3e2da 100644 --- a/jenkins_jobs/sphinx/yaml.py +++ b/jenkins_jobs/sphinx/yaml.py @@ -22,7 +22,11 @@ import re from sphinx import addnodes -from sphinx.domains.python import _pseudo_parse_arglist + +try: + from sphinx.domains.python._annotations import _pseudo_parse_arglist +except ImportError: + from sphinx.domains.python import _pseudo_parse_arglist from sphinx.domains.python import PyFunction, PyXRefRole from sphinx.ext.autodoc import Documenter from sphinx.ext.autodoc import FunctionDocumenter