-
Notifications
You must be signed in to change notification settings - Fork 338
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
Do not add HTML mixin if not building html #2076
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change makes sense to me, but just FYI, I am unable to reproduce the bug.
Using:
- my own small example docs repo (which has a RST table)
- Sphinx 8.1.3
- PyData Sphinx Theme 0.16.0
- Python 3.13
I ran make latexpdf
but I did not get any errors.
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
I recommend waiting to merge until after 0.16.1 is out. This seems innocuous but I would hate to break a bunch of user sites and have to scramble to cut a |
@drammock, agreed |
@gabalafou thanks to your minimal example I was able to find my mistake: I listed the I anyway think the fix makes sense. :) |
Today I found that our docs are broken due to a bug when building PDFs. This PR changes the [pydata-sphinx-theme](https://github.com/pydata/pydata-sphinx-theme) from the published upstream project to a branch on my for including the following fixes: - pydata/pydata-sphinx-theme#2097 - pydata/pydata-sphinx-theme#2076 I also went ahead and removed the workaround on our side since it isn't needed with the fix on my fork in place. ### Change summary - [📚🩹 Use fixed pydata-sphinx-theme from fork](5f3bedf) - [🚇🩹 Setup docs env same as on RTD](365899d)
@simonspa Thanks for the hint in your comment I faced the same issue and it was also due to the usage error that I added Might, be good to have a very prominent warning in the docs (no idea where the best place for that would be, so even sparse doc readers like me would see it) and/or warn/error if |
Maybe it would make sense to merge these changes irrespectively? They seem innocuous enough but would allow using |
When attempting to build the `latexpdf` target, pydata-sphinx-theme 0.16 currently fails on Sphinx 8.1.3 with: ``` Exception occurred: File "/home/simonspa/venv/lib64/python3.13/site-packages/pydata_sphinx_theme/translator.py", line 41, in visit_table self._table_row_indices.append(0) ^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'BootstrapHTML5Translator' object has no attribute '_table_row_indices' The full traceback has been saved in /tmp/sphinx-err-7w3z72wv.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! make: *** [Makefile:25: latexpdf] Error 1 ``` The issue appears to be that the `BootstrapHTML5Mixin` is added despite the target not being `html`. This PR moves the check for `app.builder.format` to the top level of `setup_translators`. (cc) @stephanlachnit
When attempting to build the
latexpdf
target, pydata-sphinx-theme 0.16 currently fails on Sphinx 8.1.3 with:The issue appears to be that the
BootstrapHTML5Mixin
is added despite the target not beinghtml
. This PR moves the check forapp.builder.format
to the top level ofsetup_translators
.(cc) @stephanlachnit