executablebooks / sphinx-book-theme

A clean book theme for scientific explanations and documentation with Sphinx
https://sphinx-book-theme.readthedocs.io
BSD 3-Clause "New" or "Revised" License
429 stars 198 forks source link

Lack of Sphinx 7 support breaks our layout #742

Closed flying-sheep closed 5 months ago

flying-sheep commented 1 year ago

Describe the bug

Due to use of a citation node, our layout breaks (https://github.com/scverse/cookiecutter-scverse/issues/190)

That’s the fault of a docutils bug. We therefore need docutils 0.20 or later. Docutils 0.20 is supported by Sphinx 7.0.1 and later.

We therefore need you to bump the maximum Sphinx version you support to 7.x (or unpin your maximum sphinx version)

Reproduce the bug

  1. Use sphinx-book-theme
  2. Create a sphinx document with a single citation as child of an element, e.g. via sphinxcontrib.bibtext’s .. bibliography:: directive.

List your environment

jupyter-book-theme 1.0.1, see above for the rest of the versions.

welcome[bot] commented 1 year ago

Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! :tada:

LecrisUT commented 1 year ago

There is a chain of dependency hell in the testing packages of myst-nb and sphinx_thebe. For now I have a branch to at least allow to install this: https://github.com/LecrisUT/sphinx-book-theme/tree/sphinx-7. Works so far for me, but I can't run tests

leycec commented 1 year ago

Because sphinx-book-theme requires Sphinx < 7.0.0, sphinx-book-theme is effectively no longer installable under Gentoo Linux – and presumably other platforms as well. Increasingly many third-party Sphinx extensions (including themes) require Sphinx ≥ 7.0.0, creating a mutually exclusive "soft blocker" situation in which a user installs either those common third-party Sphinx extensions or sphinx-book-theme. Clearly, sphinx-book-theme is on the losing side of that uphill battle.

I recently packaged sphinx-book-theme at my third-party Gentoo Linux overlay. Ironically, I can no longer use what I packaged. Since I no longer have any choice, I've temporarily reverted all of my projects back to vanilla pydata-sphinx-theme until this issue resolves itself. I am sad. :sob:

tl;dr

@choldgraf and friends: please avoid pinning to a maximum version of anything in pyproject.toml. You mean well, but that's almost always the worst possible thing a Python project can do.

Python isn't (Java|Type)Script. This isn't the web. This is data science. Flexibility and finesse are what's called for here.

LecrisUT commented 1 year ago

@leycec, you can package a patch to eliminate the upper pin. You'll still have dependency issues on the test dependencies if you run them, but if not, that should resolve it in the meantime.

flying-sheep commented 1 year ago

please avoid pinning to a maximum version of anything in pyproject.toml. You mean well, but that's almost always the worst possible thing a Python project can do.

You’re right in every word, but upper bounds have one use: as a temporary workaround to bugs, such as #749 in this case.

The problem here is prioritization: As you (and I) describe, the upper bound causes real world problems really fast. It should therefore be a priority to remove any of those as fast as possible.

tkaraouzene commented 10 months ago

Hello!

Any update on this topic? I'm using this template since a long time but I'm quite embarrassed to not being able to update sphinx dependency in my projects

LecrisUT commented 10 months ago

Sphinx 7 support is in, just needs a release. Not 100% sure if all is ok, but at least the tests are passing

jobrachem commented 10 months ago

Is there a timeline for when we can expect the release?

choldgraf commented 10 months ago

Hey all - yeah we're getting there. Severely bandwidth limited at the moment.

choldgraf commented 9 months ago

There's a release candidate out now!

https://github.com/executablebooks/sphinx-book-theme/releases/tag/v1.1.0rc1

flying-sheep commented 5 months ago

Thanks for fixing this!