From c480e0edc3340f83da590a7f8c31aa46519f0d23 Mon Sep 17 00:00:00 2001 From: Gertjan van Zwieten Date: Thu, 16 Nov 2023 10:41:25 +0100 Subject: [PATCH] fix deprecated function in sphinx mods The function sphinx.util.status_iterator was deprecated in favour of sphinx.util.display.status_iterator. This patch changes the generate_api function sphinx_mods.py accordingly. --- docs/sphinx_mods.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sphinx_mods.py b/docs/sphinx_mods.py index 3996c325d..e1e17e2e2 100644 --- a/docs/sphinx_mods.py +++ b/docs/sphinx_mods.py @@ -78,7 +78,7 @@ def generate_api(app): dst_root.mkdir(parents=True, exist_ok=True) srcs = tuple(f for f in sorted(nutils.glob('**/*.py')) if f != nutils/'__init__.py' and (f.name == '__init__.py' or not f.name.startswith('_'))) - for src in sphinx.util.status_iterator(srcs, 'generating api... ', 'purple', len(srcs), app.verbosity): + for src in sphinx.util.display.status_iterator(srcs, 'generating api... ', 'purple', len(srcs), app.verbosity): module = '.'.join((src.parent if src.name == '__init__.py' else src.with_suffix('')).relative_to(nutils).parts) dst = dst_root/(module+'.rst') with dst.open('w', encoding='utf-8') as f: