Alexandre Detiste pushed to branch master at Debian Med / nipype
Commits: eee4a5f6 by Dmitry Shachnev at 2025-05-07T20:45:23+03:00 Add a patch to make apidoc extension work with Sphinx 8.2.1. - - - - - d8558101 by Alexandre Detiste at 2025-05-18T16:37:21+00:00 Merge branch 'sphinx-8.2.1' into 'master' Add a patch to make apidoc extension work with Sphinx 8.2.1 See merge request med-team/nipype!1 - - - - - 2 changed files: - debian/patches/series - + debian/patches/sphinx_8.2.1.patch Changes: ===================================== debian/patches/series ===================================== @@ -10,3 +10,4 @@ fix-transpose.patch reproducible-build.patch fix-privacy-breaches.patch acres.patch +sphinx_8.2.1.patch ===================================== debian/patches/sphinx_8.2.1.patch ===================================== @@ -0,0 +1,63 @@ +Description: allow nipype.sphinx.ext.apidoc Config to work with Sphinx 8.2.1+ +Origin: upstream, https://github.com/nipy/nipype/commit/74149e03713def8a +Last-Update: 2025-05-07 + +--- a/nipype/sphinxext/apidoc/__init__.py ++++ b/nipype/sphinxext/apidoc/__init__.py +@@ -2,6 +2,9 @@ + # vi: set ft=python sts=4 ts=4 sw=4 et: + """Settings for sphinxext.interfaces and connection to sphinx-apidoc.""" + import re ++from packaging.version import Version ++ ++import sphinx + from sphinx.ext.napoleon import ( + Config as NapoleonConfig, + _patch_python_domain, +@@ -39,13 +42,24 @@ class Config(NapoleonConfig): + + """ + +- _config_values = { +- "nipype_skip_classes": ( +- ["Tester", "InputSpec", "OutputSpec", "Numpy", "NipypeTester"], +- "env", +- ), +- **NapoleonConfig._config_values, +- } ++ if Version(sphinx.__version__) >= Version("8.2.1"): ++ _config_values = ( ++ ( ++ "nipype_skip_classes", ++ ["Tester", "InputSpec", "OutputSpec", "Numpy", "NipypeTester"], ++ "env", ++ frozenset({list[str]}), ++ ), ++ *NapoleonConfig._config_values, ++ ) ++ else: ++ _config_values = { ++ "nipype_skip_classes": ( ++ ["Tester", "InputSpec", "OutputSpec", "Numpy", "NipypeTester"], ++ "env", ++ ), ++ **NapoleonConfig._config_values, ++ } + + + def setup(app): +@@ -82,8 +96,12 @@ def setup(app): + app.connect("autodoc-process-docstring", _process_docstring) + app.connect("autodoc-skip-member", _skip_member) + +- for name, (default, rebuild) in Config._config_values.items(): +- app.add_config_value(name, default, rebuild) ++ if Version(sphinx.__version__) >= Version("8.2.1"): ++ for name, default, rebuild, types in Config._config_values: ++ app.add_config_value(name, default, rebuild, types=types) ++ else: ++ for name, (default, rebuild) in Config._config_values.items(): ++ app.add_config_value(name, default, rebuild) + return {"version": __version__, "parallel_read_safe": True} + + View it on GitLab: https://salsa.debian.org/med-team/nipype/-/compare/6e8572862f4a78c63f434634e9e467e1b4992235...d8558101a9271b4e26f0732c50e2b9bff7c08c19 -- View it on GitLab: https://salsa.debian.org/med-team/nipype/-/compare/6e8572862f4a78c63f434634e9e467e1b4992235...d8558101a9271b4e26f0732c50e2b9bff7c08c19 You're receiving this email because of your account on salsa.debian.org.
_______________________________________________ debian-med-commit mailing list [email protected] https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-med-commit
