Repository navigation
fix(docs): raise the pydata-sphinx-theme floor to 0.22 - #19
Merged
Merged
Conversation
Before 0.22.0 the version banner decided it was on the preferred version by comparing the page's version and the preferred entry's as semver strings. A PEP 440 pre-release such as 0.1.0b9 is not valid semver, so the script could not compare and showed "Switch to stable version" on the stable page itself. 0.22.0 checks version_match, which the template sets, against the preferred entry first. A project that locked an older theme keeps it until something re-resolves it. With the new floor, `copier update` leaves such a lock out of date and `uv lock` moves the theme up. Sphinx goes to 8.2, which the theme requires. Fixes #18.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Raises the docs tool floors:
pydata-sphinx-theme>=0.22(was>=0.16) andsphinx>=8.2(was>=8.1, which is what the theme requires).The version dropdown's warning banner showed on the
stable/page of a package with a PEP 440 pre-release version, such as0.1.0b9: "This is documentation for version 0.1.0b9. Switch to stable version", with the page already on the stable URL (fips's live docs). Before 0.22.0, the theme decided it was on the preferred version by comparing the page's version and the preferred entry's as semver strings.0.1.0b9is not valid semver (0.1.0-b9is), so it could not compare and assumed the page was out of date. 0.22.0 checks the page'sversion_match, which the template already sets, against the preferred entry first. CalVer versions are valid semver, so those packages never showed it.A project that locked an older theme keeps it until something re-resolves it, and the old floor didn't ask for a newer one. With the new floor,
copier updateleaves a package whose lock holds 0.16.1 out of date, anduv lock(theuv-lockpre-commit hook runs it on commit) moves the theme and Sphinx up.Tested:
just testpasses for both bakes. By hand, in a baked project with its lock pinned to theme 0.16.1, the new floor makesuv lockre-resolve it.This doesn't fix a page that is already published: fips's
stable/fixes itself at its next release. Needs a patch tag (v1.2.1) to reach packages.Fixes #18.