chore(deps): unpin mkdocs-material, require click>=8.4 for docs#10333
Open
tschm wants to merge 1 commit into
Open
chore(deps): unpin mkdocs-material, require click>=8.4 for docs#10333tschm wants to merge 1 commit into
tschm wants to merge 1 commit into
Conversation
`mkdocs-material` was pinned to `==9.6.20` because live reload broke in
`>= 9.6.21`. The pin treats a symptom: 9.6.20 is simply the last release
that capped `click<8.2.2`, and it was that incidental click cap doing the
work.
The actual bug is in click. MkDocs declares `--no-livereload` /
`--livereload` as a feature switch group — two `flag_value` options
sharing one parameter name — where only the second carries
`default=True`. click 8.3.0 started dropping that explicit default when a
sibling without one was declared first, so `mkdocs serve` silently came
up with live reload off. click 8.4.0 fixed it ("an option that received
an explicit `default=` keyword wins over a sibling whose default was
auto-derived").
Bisected in a scratch mkdocs project:
click 8.2.1 live reload ON
click 8.3.0 OFF
click 8.3.1 OFF
click 8.3.2 OFF
click 8.3.3 OFF
click 8.4.0 ON
click 8.4.2 ON
So require `click>=8.4` in the docs group and let mkdocs-material float
from 9.7.5 (the release that drops the `pymdown-extensions~=10.2` cap and
caps `mkdocs<2`). No `--livereload` workaround is needed, and
`make docs-serve` is unchanged.
This matters beyond the docs. Because uv resolves all groups together,
the `==9.6.20` pin was holding `click` at 8.2.1 and `pymdown-extensions`
at 10.x across the *whole* workspace — so the test and dev environments
never saw the click 8.3/8.4 that marimo's own `click>=8.0,<9` allows
users to install. After this change the workspace resolves click 8.4.2.
Verified:
- `mkdocs build --strict` passes on both 9.6.20 and 9.7.7. The only new
console output is upstream's informational MkDocs 2.0 banner, which
does not affect strict mode.
- `mkdocs serve --clean` (the existing docs-serve target, no extra flags)
reports "Watching paths for changes" on click 8.4.2.
- `tests/` (minus `test_cli`) and `tests/_cli/test_cli_*` show no new
failures on click 8.4.2 versus 8.2.1.
- Rendered HTML differs on 235/236 pages, but only as markup
normalization (self-closing tags, whitespace), a Font Awesome 7 icon
bump, and social meta tags moving from `name="twitter:*"` to
`property="twitter:*"` — all upstream theme changes.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the documentation dependency set to address MkDocs live-reload behavior by constraining click appropriately, while allowing mkdocs-material to float again (instead of being pinned), so the workspace can resolve newer docs-stack dependencies.
Changes:
- Replace the
mkdocs-material==9.6.20pin with a floatingmkdocs-material>=9.7.5. - Add a
click>=8.4requirement in the docs dependency group to avoid MkDocs live-reload issues seen with click 8.3.x.
| # 8.4.0, so require that here rather than pinning mkdocs-material back to | ||
| # 9.6.20 (the last release that capped click<8.2.2, which used to mask it). | ||
| # https://github.com/squidfunk/mkdocs-material/issues/8478 | ||
| "click>=8.4", |
| @@ -269,8 +269,15 @@ docs = [ | |||
| "marimo_docs", | |||
| "ruff>=0.15.18", | |||
| "mkdocs>=1.6.1", | |||
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.
This pull request was authored by a coding agent.
📝 Summary
Closes #10334
The
docsgroup pinnedmkdocs-material==9.6.20with:That pin treats a symptom. 9.6.20 is just the last release that capped
click<8.2.2— the incidental click cap was doing the work, not anything about the theme. mkdocs-material dropped that cap in 9.6.21, which is why live reload appeared to break there.The actual bug is in click. MkDocs declares
--no-livereload/--livereloadas a feature switch group — twoflag_valueoptions sharing one parameter name, where only the second carriesdefault=True:click 8.3.0 started dropping that explicit default when a sibling without one was declared first, so
mkdocs servesilently came up with live reload off. click 8.4.0 fixed it, per its changelog:Bisected in a scratch mkdocs project to confirm:
So this requires
click>=8.4in thedocsgroup and letsmkdocs-materialfloat from>=9.7.5(the release that drops thepymdown-extensions~=10.2cap and adds amkdocs<2cap). No--livereloadworkaround is needed andmake docs-serveis unchanged.Why this matters beyond the docs
Because uv resolves all dependency groups together, the
==9.6.20pin was holdingclickat 8.2.1 andpymdown-extensionsat 10.x across the entire workspace — including thetestanddevenvironments. marimo's own runtime dependency isclick>=8.0,<9, so CI has never exercised the click 8.3/8.4 that users actually get. After this change the workspace resolves click 8.4.2.It also unblocks CI coverage for #10332 (relaxing the
pymdown-extensionscap to allow 11.x) — with the pin in place, that cap could be relaxed but the resolver would still pick 10.x, so CI would never test 11.x. These two PRs are independent and can merge in either order; together they let CI resolvepymdown-extensions11.x.Verification
mkdocs build --strictpasses on both 9.6.20 (baseline) and 9.7.7 — exit 0 each time. The only new console output on 9.7.7 is upstream's informational MkDocs 2.0 banner, which squidfunk notes does not affect strict builds (confirmed).mkdocs serve --clean— the existingdocs-servetarget verbatim, no extra flags — reportsWatching paths for changes: 'docs', 'mkdocs.yml', 'marimo'on click 8.4.2.pytest tests/ -k "not test_cli"(~11k tests) andpytest tests/_cli/test_cli_*show no new failures on click 8.4.2 versus 8.2.1. (Two pre-existing failures on both:test_openapi_up_to_date, and a cluster intests/_code_mode/that comes from my own user-level~/.config/marimo/marimo.toml.)name="twitter:*"toproperty="twitter:*". All upstream theme changes, no content or structural differences.One thing worth a maintainer's eye: that
name="twitter:*"→property="twitter:*"change is upstream's doing, but social card previews on docs.marimo.io are user-visible, so it may be worth a spot check with a card validator after merge.I could not fully reproduce the CI docs environment locally (my machine needed
DYLD_FALLBACK_LIBRARY_PATH=/opt/homebrew/libforcairosvgto find libcairo for the social plugin), so the strict-build results above come from a locally patched environment rather than the CI image.📋 Pre-Review Checklist
✅ Merge Checklist
pyproject.tomlcomment that replaces the old one.mkdocs build --strictdocs CI job.🤖 Generated with Claude Code