Skip to content

docs: pin Pygments==2.18.0 and bump pymdown-extensions to 10.14#19

Merged
mikeappsec merged 1 commit into
mainfrom
fix/docs-pygments-pin
Apr 29, 2026
Merged

docs: pin Pygments==2.18.0 and bump pymdown-extensions to 10.14#19
mikeappsec merged 1 commit into
mainfrom
fix/docs-pygments-pin

Conversation

@mikeappsec

Copy link
Copy Markdown
Owner

CI was failing on 'AttributeError: NoneType object has no attribute replace' inside pymdownx.highlight -> pygments.formatters.html.HtmlFormatter. Root cause: pymdown-extensions <= 10.11 passes filename=None to HtmlFormatter, which Pygments 2.19+ no longer tolerates. Local Windows builds happened to have Pygments 2.18.0 cached so the regression only surfaced on the GitHub Actions runner.

Two-part fix: bump pymdown-extensions to 10.14 (which carries the upstream fix for the None-default), and explicitly pin Pygments==2.18.0 as belt-and-braces so a future Pygments minor that re-tightens the same surface cannot break the build silently. mkdocs-material 9.5.39 stays put; --strict build verified clean against all three pins.

CI was failing on 'AttributeError: NoneType object has no attribute replace' inside pymdownx.highlight -> pygments.formatters.html.HtmlFormatter. Root cause: pymdown-extensions <= 10.11 passes filename=None to HtmlFormatter, which Pygments 2.19+ no longer tolerates. Local Windows builds happened to have Pygments 2.18.0 cached so the regression only surfaced on the GitHub Actions runner.

Two-part fix: bump pymdown-extensions to 10.14 (which carries the upstream fix for the None-default), and explicitly pin Pygments==2.18.0 as belt-and-braces so a future Pygments minor that re-tightens the same surface cannot break the build silently. mkdocs-material 9.5.39 stays put; --strict build verified clean against all three pins.
@mikeappsec
mikeappsec merged commit a693c8e into main Apr 29, 2026
3 checks passed
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.

1 participant