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

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

Sphinx 7.2 support #943

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

Comments

@AA-Turner
Copy link

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
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!

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