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

Use latest sphinx_rtd_theme by default? #7858

Closed
mgeier opened this issue Jan 21, 2021 · 5 comments
Closed

Use latest sphinx_rtd_theme by default? #7858

mgeier opened this issue Jan 21, 2021 · 5 comments
Labels
Support Support question

Comments

@mgeier
Copy link
Contributor

mgeier commented Jan 21, 2021

Currently, sphinx-rtd-theme<0.5 is used by default, see:

negative='sphinx-rtd-theme<0.5',

What is blocking the use of the new RTD theme by default?

It looks like version 0.5.0 is already more than half a year old and there is even 0.5.1 available.

I'm aware that there are ways to use newer versions for individual projects, but I'm interested in the default case.

See also #7165, #7396.

@stsewd
Copy link
Member

stsewd commented Jan 21, 2021

This is under a feature flag that defaults to use the latest version for projects created after October 20th 2020. This is done to avoid breaking docs from existing users that were using a default old sphinx version (1.8). I can enable it for your project if you want. But yeah, we recommend pinning your dependencies explicitly to avoid breaking the docs in the future and having reproducible builds.

@stsewd stsewd added the Support Support question label Jan 21, 2021
@mgeier
Copy link
Contributor Author

mgeier commented Jan 22, 2021

Thanks for the information, that's good to know!

This is under a feature flag that defaults to use the latest version for projects created after October 20th 2020. This is done to avoid breaking docs from existing users that were using a default old sphinx version (1.8).

OK, so does that mean that those "old" projects will never be upgraded to a higher Sphinx version if the default settings are used?

I guess this also means that it's not sufficient for those projects to request sphinx>=2, but they will in addition also have to request sphinx-rtd-theme>=0.5 (assuming they want the latest versions)?

I can enable it for your project if you want.

No, thanks, I don't use the RTD theme for most of my projects, and I changed the requirements.txt manually for where I need it:
spatialaudio/nbsphinx@rtd-theme^...rtd-theme
https://nbsphinx.readthedocs.io/en/rtd-theme/

The reason why I'm asking is that my Sphinx extension https://github.com/mgeier/sphinx-last-updated-by-git did not work by default on RTD and as it looks like it will keep not working by default for "old" projects. See also mgeier/sphinx-last-updated-by-git#1.

But yeah, we recommend pinning your dependencies explicitly to avoid breaking the docs in the future and having reproducible builds.

OK, good to know.

I think I personally prefer getting newer versions automatically, so I will probably rather use >= than == to request the Sphinx version.

@stsewd
Copy link
Member

stsewd commented Jan 22, 2021

OK, so does that mean that those "old" projects will never be upgraded to a higher Sphinx version if the default settings are used?

For now, yeah. We plan to have a "supported versions" policy that may change that, but having users set the versions of their dependencies explicitly is more the goal we want to achieve.

I guess this also means that it's not sufficient for those projects to request sphinx>=2, but they will in addition also have to request sphinx-rtd-theme>=0.5 (assuming they want the latest versions)?

Yes, that's correct

@stsewd stsewd closed this as completed Jan 22, 2021
@paulmueller
Copy link

This is done to avoid breaking docs from existing users that were using a default old sphinx version (1.8). I can enable it for your project if you want.

@stsewd But, to be thorough here, you would have to pin docutils==0.16.0 for those old projects as well, correct? Currently, all my projects are broken due to readthedocs/sphinx_rtd_theme#1115. Now I have to go through all my repositories and pin docutils (or sphinx and the rtd_theme). Wouldn't it be better to have an entry in the configuration file that allows you to set the version of rtd that you would like to use? Then rtd could just automatically install a pinned set of dependencies...

paulmueller added a commit to DC-analysis/dclab that referenced this issue Nov 12, 2021
paulmueller added a commit to ZELLMECHANIK-DRESDEN/ShapeOut2 that referenced this issue Nov 12, 2021
paulmueller added a commit to AFM-analysis/afmformats that referenced this issue Nov 12, 2021
paulmueller added a commit to RI-imaging/CellReel that referenced this issue Nov 12, 2021
paulmueller added a commit to RI-imaging/cellsino that referenced this issue Nov 12, 2021
paulmueller added a commit to RI-imaging/DryMass that referenced this issue Nov 12, 2021
paulmueller added a commit to RI-imaging/flimage that referenced this issue Nov 12, 2021
paulmueller added a commit to GuckLab/ggf that referenced this issue Nov 12, 2021
paulmueller added a commit to GuckLab/impose that referenced this issue Nov 12, 2021
paulmueller added a commit to FCS-analysis/multipletau that referenced this issue Nov 12, 2021
paulmueller added a commit to AFM-analysis/nanite that referenced this issue Nov 12, 2021
paulmueller added a commit to RI-imaging/nrefocus that referenced this issue Nov 12, 2021
paulmueller added a commit to RI-imaging/ODTbrain that referenced this issue Nov 12, 2021
paulmueller added a commit to FCS-analysis/PyCorrFit that referenced this issue Nov 12, 2021
paulmueller added a commit to AFM-analysis/PyJibe that referenced this issue Nov 12, 2021
paulmueller added a commit to FCS-analysis/PyScanFCS that referenced this issue Nov 12, 2021
paulmueller added a commit to RI-imaging/qpformat that referenced this issue Nov 12, 2021
paulmueller added a commit to RI-imaging/qpimage that referenced this issue Nov 12, 2021
paulmueller added a commit to RI-imaging/qpsphere that referenced this issue Nov 12, 2021
paulmueller added a commit to RI-imaging/radontea that referenced this issue Nov 12, 2021
@paulmueller
Copy link

Just saw that there is already a PR: #8668

ddabble added a commit to jazzband/django-simple-history that referenced this issue Jul 5, 2023
After bumping Sphinx from 5.3.0 to 7.0.1, the docs build failed (see
https://readthedocs.org/projects/django-simple-history/builds/21210847/)
due to Read the Docs automatically installing an outdated version of
`sphinx-rtd-theme` (reason:
readthedocs/readthedocs.org#7858 (comment)).

Following the guidelines in their docs (see
https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html#use-a-requirements-file-for-python-dependencies),
this commit pins the version of `sphinx-rtd-theme` - specifically to
the newest one.
ddabble added a commit to jazzband/django-simple-history that referenced this issue Jul 5, 2023
* Bump sphinx from 5.3.0 to 7.0.1 in /requirements

Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 5.3.0 to 7.0.1.
- [Release notes](https://github.com/sphinx-doc/sphinx/releases)
- [Changelog](https://github.com/sphinx-doc/sphinx/blob/master/CHANGES)
- [Commits](sphinx-doc/sphinx@v5.3.0...v7.0.1)

---
updated-dependencies:
- dependency-name: sphinx
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Pin sphinx-rtd-theme in requirements/docs.txt

After bumping Sphinx from 5.3.0 to 7.0.1, the docs build failed (see
https://readthedocs.org/projects/django-simple-history/builds/21210847/)
due to Read the Docs automatically installing an outdated version of
`sphinx-rtd-theme` (reason:
readthedocs/readthedocs.org#7858 (comment)).

Following the guidelines in their docs (see
https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html#use-a-requirements-file-for-python-dependencies),
this commit pins the version of `sphinx-rtd-theme` - specifically to
the newest one.

* Bump Sphinx down to 6.2.1

It turns out that the newest version (1.2.2) requires Sphinx<7 (see
https://github.com/readthedocs/sphinx_rtd_theme/blob/1.2.2/setup.cfg#L48).
Version 1.0.0 doesn't (see
https://github.com/readthedocs/sphinx_rtd_theme/blob/1.0.0/setup.py#L121),
but that one depends on docutils<0.18 - and Sphinx 7.0.1 depends on
docutils>=0.18.1.

So the only solution seems to be bumping Sphinx down to the first
version below 7.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Anders <6058745+ddabble@users.noreply.github.com>
waveform80 added a commit to gpiozero/gpiozero that referenced this issue Oct 1, 2023
See [1] for details of the "feature-flag" that does this. Anyway, turns
out our docs won't build with a sphinx that ancient any more, Sphinx 2.x
is broken on modern Python, as is 3.x, so 4.x is the minimum we now
require.

At least, that's what my local experiments suggest. Let's see if this
works on RTD, or if I need another commit ...

[1]: readthedocs/readthedocs.org#7858 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Support Support question
Projects
None yet
Development

No branches or pull requests

3 participants