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

toctree(...) API changed in Sphinx 7.2 #11607

Closed
humitos opened this issue Aug 17, 2023 · 3 comments
Closed

toctree(...) API changed in Sphinx 7.2 #11607

humitos opened this issue Aug 17, 2023 · 3 comments

Comments

@humitos
Copy link
Contributor

humitos commented Aug 17, 2023

Describe the bug

On Sphinx < 7.2 we were calling toctree(includehidden=True) and it was working fine. However, starting on Sphinx 7.2 it expects the includehidden= parameter to be a string. This was changed in 6f5a99a

I'm opening this issue mainly to ask if this change was on purpose or was a mistake? What's the approach we should follow here? There are other attributes, like titles_only= and collapse= where we are passing boolean as well and that made me doubt about this.

How to Reproduce

I found this issue when running tests for sphinx_rtd_theme while fixing another internal API change at readthedocs/sphinx_rtd_theme#1503

Environment Information

Python 3.10
Sphinx 7.2.0

Sphinx extensions

No response

Additional context

No response

humitos added a commit to readthedocs/sphinx_rtd_theme that referenced this issue Aug 17, 2023
Sphinx 7.2 changed its internal API for `toctree()`.

See sphinx-doc/sphinx#11607
Related #1463
@AA-Turner
Copy link
Member

AA-Turner commented Aug 17, 2023

This was inadvertent, yes. Will include in Sphinx 7.2.2.

If you don't include a tobool call, the argument is passed as a string, which is what I was encountering.

A

@AA-Turner
Copy link
Member

See also scikit-hep/pyhf#2297

@AA-Turner
Copy link
Member

Sphinx 7.2.2 has been released.

A

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants