Skip to content

Commit

Permalink
fix deprecated function in sphinx mods
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
gertjanvanzwieten committed Nov 16, 2023
1 parent 288080e commit c480e0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/sphinx_mods.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit c480e0e

Please sign in to comment.