Skip to content

fix(docs): raise the pydata-sphinx-theme floor to 0.22 - #19

Merged
jmineau merged 1 commit into
mainfrom
fix/theme-floor
Oct 10, 2026
Merged

jmineau merged 1 commit into
mainfrom
fix/theme-floor

Conversation

@jmineau

@jmineau jmineau commented Oct 10, 2026

Copy link
Copy Markdown
Owner

Raises the docs tool floors: pydata-sphinx-theme>=0.22 (was >=0.16) and sphinx>=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 as 0.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.0b9 is not valid semver (0.1.0-b9 is), so it could not compare and assumed the page was out of date. 0.22.0 checks the page's version_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 update leaves a package whose lock holds 0.16.1 out of date, and uv lock (the uv-lock pre-commit hook runs it on commit) moves the theme and Sphinx up.

Tested: just test passes for both bakes. By hand, in a baked project with its lock pinned to theme 0.16.1, the new floor makes uv lock re-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.

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.
@jmineau
jmineau merged commit f925aa5 into main Oct 10, 2026
1 check passed
@jmineau
jmineau deleted the fix/theme-floor branch October 10, 2026 05:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Version banner shows on the stable page for PEP 440 pre-release versions with pydata-sphinx-theme < 0.22

1 participant