-
Notifications
You must be signed in to change notification settings - Fork 326
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
Incompatibility with Sphinx dev #1404
Comments
Thanks for the heads-up; I'll raise this upstream. I guess we should be more diligent about testing against dev version of sphinx. |
In general, we don't consider A |
a lot of the TocTree code was written by @choldgraf I think, so I'd have to dig to see exactly how we use it everywhere. But regarding this particular case (
which is called from
pydata-sphinx-theme/src/pydata_sphinx_theme/toctree.py Lines 64 to 69 in 0956f22
|
I'm doing some similar things in https://github.com/pradyunsg/lutra/blob/97f6da4f24ab3a76fdbb18e74093b69176a89f5b/src/lutra/_navigation.py with
What is that based on? The name is public by all Python naming conventions and https://www.sphinx-doc.org/en/master/internals/release-process.html#deprecation-policy doesn't really distinguish between APIs on some external factor (eg: whether something is documented), and past changes in Sphinx have followed the conservative deprecation policy around these sorts of API renames (eg: sphinx-doc/sphinx@77a02cf#diff-f41e19a9b77f4670d4dd1ea61f80d518c93a4403112fd7e91253dac47cf55fe5R345). |
It is entirely undocumented (see the Extension API reference). Maintainers of Sphinx (and Docutils) have historically not marked things as private with the leading underscore convention; I'm trying to clear this up but it takes a lot of time and effort. The conservatism on renamings has been as extension maintainers use undocumented parts of the Sphinx API (likely due to mismatches in expectations viz private/public) and when Sphinx changes or refactors things, there are complaints that X is now broken, perhaps not unreasonably. Ideally we'd design and document better public APIs, but partly I don't know what the needs are from themes and extensions for said APIs, hence the chicken-and-egg. A |
Yea, that's part of the problem here and the reason that Sphinx should move slowly when making changes IMO. 😅 That said, I empathise that taking that level of care around these things is difficult and (for me as a maintainer) frustratingly slow.
This is very much appreciated!
In this case, we have the expressed need described and presented to the Sphinx maintainers in the issue tracker and mentioned the upcoming changes as well. Is there anything else that we can do to make this easier for you? |
To note, this style of putting the inter-document toctree in the left sidebar and the intra-document toctree in the right sidebar has emerged as the de-facto standard in most modern documentation, and is implemented by the main popular themes. Perhaps it would be worth designing some type of higher-order mechanism to do this? Though, of course, if that's non-trivial it shouldn't block adding some form of public API that themes can use for this in the meantime. |
My 2 cents is that it'd be better for Sphinx to expose the toctree structure to themes such that they can do the code generation, instead of one-more-option for the tab-style layouts, that provides more flexibility and doesn't require changes in Sphinx as the documentation site conventions/expectations evolve. |
Sphinx 7.2 was released last night. So now this theme breaks in latest stable Sphinx. Any project using this theme have to pin |
xref #1406 (comment) |
@AA-Turner we certainly appreciate you submitting a fix here, but unfortunately that doesn't fully solve the problem because we have a couple of other blocker issues that are preventing us from pushing out a release on Sphinx's schedule. |
@drammock , not even a hot fix? |
This comment was marked as off-topic.
This comment was marked as off-topic.
@pllim please may you open a new Sphinx issue? 7.2.2 may be needed... A |
This comment was marked as outdated.
This comment was marked as outdated.
Just the above would be fine initially, mainly so I don't forget the new issue. |
Ah, wait. I think the warnings are from a different upstream fix ( |
This can probably be closed now. A |
A Sphinx PR merged today (sphinx-doc/sphinx#11565) renamed
TocTree.get_toctree_ancestors()
toTocTree._get_toctree_ancestors()
. This causes this theme to error here:pydata-sphinx-theme/src/pydata_sphinx_theme/toctree.py
Line 420 in 0956f22
I don't know whether you want to ask Sphinx if they intended to make that change in API, or you just want to work around it in the theme.
The text was updated successfully, but these errors were encountered: