fix: bump pymdown-extensions for pygments 2.20.0 compat#482
fix: bump pymdown-extensions for pygments 2.20.0 compat#482eric-tramel merged 2 commits intomainfrom
Conversation
Greptile SummaryThis PR is a targeted dependency maintenance fix: it adds an explicit
|
| Filename | Overview |
|---|---|
| pyproject.toml | Adds explicit pymdown-extensions>=10.21.2,<11 lower-bound to the docs dependency group to ensure the pygments 2.20.0 compatibility fix is resolved; version range is well-bounded. |
| uv.lock | Lockfile updated consistently: revision bumped 2→3, pymdown-extensions added to docs group entries, version pinned to 10.21.2 with correct PyPI URLs and SHA256 hashes. |
Sequence Diagram
sequenceDiagram
participant uv as uv resolve
participant pyproject as pyproject.toml
participant mkdocs_material as mkdocs-material
participant pymdown as pymdown-extensions
participant pygments as pygments 2.20.0
uv->>pyproject: read docs dependency group
pyproject-->>uv: pymdown-extensions>=10.21.2,<11 (explicit)
uv->>mkdocs_material: resolve transitive deps
mkdocs_material-->>pymdown: requires pymdown-extensions
uv->>pymdown: satisfies >=10.21.2 → resolves 10.21.2
pymdown->>pygments: calls HtmlFormatter with filename=""
pygments-->>pymdown: renders syntax-highlighted code blocks
pymdown-->>mkdocs_material: markdown extensions processed
Note over pymdown,pygments: 10.21.2 coerces None to "" before passing to pygments, fixing the crash
Reviews (4): Last reviewed commit: "Merge branch 'main' into fix/bump-pymdow..." | Re-trigger Greptile
Pygments 2.20.0 (released 2026-03-29 as a security fix) introduced stricter handling of `filename=None` in `HtmlFormatter`, which caused `mkdocs build` to crash when rendering code reference pages. pymdown-extensions 10.21.2 (also released 2026-03-29) fixes this by coercing `None` to `""` before passing to pygments. Since pymdown-extensions is a transitive dependency (via mkdocs-material and mkdocstrings), we add an explicit lower-bound constraint to ensure the compatible version is resolved. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
cec1b73 to
65439f7
Compare
Summary
Fix to regain capability to run
make serve-docs-locally.filename=NoneinHtmlFormatter, causingmkdocs buildto crash on code reference pages (e.g.,code_reference/analysis.md).Noneto""before passing to pygments."pymdown-extensions>=10.21.2"lower-bound constraint to thedocsdependency group to ensure the fix is always resolved.