Repository navigation
Pin pygments<2.20 in docs extra to fix mkdocs build - #5
Merged
Merged
Conversation
mkdocs build failed with "Error reading page 'api/analysis.md': 'NoneType' object has no attribute 'replace'" on every mkdocstrings page whose docstrings contain an Examples doctest section. Root cause is a version incompatibility, not repo code: pymdown-extensions 10.20 passes filename=None to Pygments' BlockHtmlFormatter (pymdownx/highlight.py:410) and Pygments 2.20.0 no longer coerces None before html.escape(). Pin pygments<2.20 in the docs extra; drop the pin once pymdown-extensions passes filename=title or "".
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.
Summary
mkdocs buildfailed withError reading page 'api/analysis.md': 'NoneType' object has no attribute 'replace'— actually affecting every mkdocstrings page whose docstrings contain a numpyExamplesdoctest section (api/core.md,api/io.md, ...);analysis.mdjust failed first.Root cause is a dependency incompatibility, not repo code: pymdown-extensions 10.20 passes
filename=Noneto Pygments'BlockHtmlFormatter(pymdownx/highlight.py:410), and Pygments 2.20.0 no longer coercesNonebeforehtml.escape(). Pinpygments<2.20in thedocsextra; the pin can be dropped once pymdown-extensions passesfilename=title or "".Test plan
mkdocs buildcompletes with zero errors and zero warnings.pytest tests/: 138 passed, 31 skipped (unaffected, docs-only dep change).🤖 Generated with Claude Code