Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

The rst2md tests fail in the CI #1266

Open
mwouts opened this issue Aug 2, 2024 · 2 comments
Open

The rst2md tests fail in the CI #1266

mwouts opened this issue Aug 2, 2024 · 2 comments

Comments

@mwouts
Copy link
Owner

mwouts commented Aug 2, 2024

In the recent runs of the CI like here, the conversion from rst to md fails:

ImportError while loading conftest '/home/runner/work/jupytext/jupytext/tests/conftest.py'.
tests/conftest.py:18: in <module>
    import jupytext
src/jupytext/__init__.py:3: in <module>
    from .formats import NOTEBOOK_EXTENSIONS, get_format_implementation, guess_format
src/jupytext/formats.py:13: in <module>
    from .cell_reader import (
src/jupytext/cell_reader.py:18: in <module>
    from sphinx_gallery.notebook import rst2md
/opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages/sphinx_gallery/notebook.py:20: in <module>
    from .py_source_parser import split_code_and_text_blocks
/opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages/sphinx_gallery/py_source_parser.py:21: in <module>
    from .sphinx_compatibility import getLogger
/opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages/sphinx_gallery/sphinx_compatibility.py:71: in <module>
    status_iterator = sphinx.util.status_iterator
/opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages/sphinx/util/__init__.py:271: in __getattr__
    raise AttributeError(msg)
E   AttributeError: module 'sphinx.util' has no attribute 'status_iterator'

This might be caused by a new version of sphinx. We might have to either pin the version of sphinx used in those tests, or even transition to a more up-to-date conversion framework like rst-to-myst

@mwouts
Copy link
Owner Author

mwouts commented Aug 10, 2024

With sphinx==7.2.6 the test passes but yields this warning:

RemovedInSphinx80Warning: The alias 'sphinx.util.status_iterator' is deprecated, use 'sphinx.util.display.status_iterator' instead. Check CHANGES for Sphinx API modifications.
    status_iterator = sphinx.util.status_iterator

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

mwouts added a commit that referenced this issue Aug 10, 2024
Fixes: the `rst2md` tests fail in the CI #1266
mwouts added a commit that referenced this issue Aug 10, 2024
Fixes: the `rst2md` tests fail in the CI #1266
@juanep97
Copy link

juanep97 commented Aug 28, 2024

Hi! I also encountered this issue using Sphinx 8.0.2. By running sphinx with --verbose, it seems that the error stems from the interaction with sphinx_gallery<=0.7, which uses 'sphinx.util.status_iterator', removed in Sphinx 8.

It seems that running with the latest sphinx_gallery version does not result in any problem, although jupytext still complains that it is not compatible?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants