Skip to content

Commit

Permalink
Avoid warning about deprecated status_iterator
Browse files Browse the repository at this point in the history
  • Loading branch information
mgeier committed May 14, 2023
1 parent 69700fa commit 4d780a4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/nbsphinx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@
import sphinx.errors
import sphinx.transforms.post_transforms.images
from sphinx.util.matching import patmatch
try:
from sphinx.util.display import status_iterator
except ImportError:
# This will be removed in Sphinx 8:
from sphinx.util import status_iterator
import traitlets


Expand Down Expand Up @@ -1641,7 +1646,6 @@ def html_collect_pages(app):
files = set()
for file_list in app.env.nbsphinx_files.values():
files.update(file_list)
status_iterator = sphinx.util.status_iterator
for file in status_iterator(files, 'copying linked files... ',
sphinx.util.console.brown, len(files)):
target = os.path.join(app.builder.outdir, file)
Expand Down

0 comments on commit 4d780a4

Please sign in to comment.