Skip to content

fix: pin pygments to upstream filename=None fix#57

Merged
hadrien merged 1 commit intomainfrom
fix/pygments-pin
May 5, 2026
Merged

fix: pin pygments to upstream filename=None fix#57
hadrien merged 1 commit intomainfrom
fix/pygments-pin

Conversation

@hadrien
Copy link
Copy Markdown
Owner

@hadrien hadrien commented May 5, 2026

Problem

  • uv run mkdocs build fails: AttributeError: 'NoneType' object has no attribute 'replace'.
  • Pygments 2.20.0 wraps filename with html.escape (0f97e7c).
  • pymdown-extensions passes filename=None for mkdocstrings source blocks without a title.
  • Upstream fix PR #3086 is merged but unreleased.

Solution

  • Pin pygments to commit b6f6dab via git URL in the docs extra.
  • Drop the pin once Pygments 2.20.1 ships.

Pygments 2.20.0 wraps filename with html.escape, which crashes when
pymdown-extensions passes filename=None (mkdocstrings source blocks
without a title). Upstream fix is merged but unreleased; pin to that
commit until 2.20.1 ships.
@codecov
Copy link
Copy Markdown

codecov Bot commented May 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.36%. Comparing base (338b796) to head (7cc680f).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #57   +/-   ##
=======================================
  Coverage   97.36%   97.36%           
=======================================
  Files           1        1           
  Lines         114      114           
  Branches        2        2           
=======================================
  Hits          111      111           
  Misses          3        3           
Flag Coverage Δ
fastapi-post121 97.36% <ø> (ø)
fastapi-pre121 97.36% <ø> (ø)
sqlmodel 97.36% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@hadrien hadrien merged commit df0ab7f into main May 5, 2026
6 checks passed
@hadrien hadrien deleted the fix/pygments-pin branch May 5, 2026 14:45
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