Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Sphinx 7.2 support #943

Closed
AA-Turner opened this issue Aug 17, 2023 · 7 comments
Closed

Sphinx 7.2 support #943

AA-Turner opened this issue Aug 17, 2023 · 7 comments

Comments

@AA-Turner
Copy link
Collaborator

Hi,

This is a reference to sphinx-doc/sphinx#11605, where a user has reported an incompatability in:

        self._default_build_dir = os.path.dirname(app.doctreedir.rstrip(os.sep))

with the following reproducer:

$ echo "Test" > index.rst
$ echo "extensions = ['breathe']" > conf.py
$ sphinx-build -M html . _build
Running Sphinx v7.2.0

Exception occurred:
  File "/Users/simon/.local/share/virtualenvs/fob-HUh8Hd7H/lib/python3.11/site-packages/breathe/project.py", line 116, in __init__
    self._default_build_dir = os.path.dirname(app.doctreedir.rstrip(os.sep))
                                              ^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'PosixPath' object has no attribute 'rstrip'
The full traceback has been saved in /var/folders/x6/97fjm0c540s7yn9zlv7fp9k00000gn/T/sphinx-err-0d2v5eaa.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!

Sphinx 7.2 changed all internal paths to pathlib -- this could be resolved by either calling os.fspath on app.doctreedir or by calling Path(app.doctreedir).parent to also support pre-7.2 Sphinx.

A

iequidoo added a commit to deltachat/deltachat-core-rust that referenced this issue Aug 21, 2023
iequidoo added a commit to deltachat/deltachat-core-rust that referenced this issue Aug 21, 2023
zingale pushed a commit to AMReX-Astro/Microphysics that referenced this issue Aug 21, 2023
Breathe is currently incompatible with Sphinx >= 7.2: see breathe-doc/breathe#943.
iequidoo added a commit to deltachat/deltachat-core-rust that referenced this issue Aug 21, 2023
@AA-Turner
Copy link
Collaborator Author

Note, I've released Sphinx 7.2.3 which contains a work-around for this issue. Projects are still heavily encouraged to use pathlib.Path objects over str based paths.

A

@mattip
Copy link
Contributor

mattip commented Aug 24, 2023

Thanks!

@AA-Turner
Copy link
Collaborator Author

AA-Turner commented Jul 22, 2024

For information, as planned, Sphinx 8 will remove the workarounds in the Sphinx 7 series. See sphinx-doc/sphinx#12650.

Until breathe makes the required changes, it will unfortunatley be broken. Michael has indicated Sphinx should move forward with our plans (sphinx-doc/sphinx#12629 (comment)) -- I am not aware if he would be open to offers of volunteers open to helping maintain breathe.

A

@mattip
Copy link
Contributor

mattip commented Jul 22, 2024

It would be helpful if breathe would reflect that requirement in its setup.py

requires = ["Sphinx>=4.0,!=5.0.0", "docutils>=0.12"]

@mattip
Copy link
Contributor

mattip commented Jul 30, 2024

Cool, thanks @AA-Turner for the fixes.

@AA-Turner
Copy link
Collaborator Author

Note tests are failing etc -- I spent a couple of hours last night just doing modernisation, more work still needed to get everything to green.

I'm able to merge PRs if any are outstanding that you think ought be looked at.

A

@mattip
Copy link
Contributor

mattip commented Jul 30, 2024

I just want what we (NumPy) already have to work with a more modern sphinx. Although I admit sphinx is moving a little too fast for me, I would prefer they not break things.

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

No branches or pull requests

2 participants