Skip to content

Replace m2r2 with myst-parser for docs builds#14808

Open
rtibbles wants to merge 2 commits into
learningequality:developfrom
rtibbles:replace-m2r2-with-myst-parser
Open

Replace m2r2 with myst-parser for docs builds#14808
rtibbles wants to merge 2 commits into
learningequality:developfrom
rtibbles:replace-m2r2-with-myst-parser

Conversation

@rtibbles
Copy link
Copy Markdown
Member

@rtibbles rtibbles commented Jun 5, 2026

Summary

Replaces unmaintained m2r2 with myst-parser for the docs build, dropping mistune (whose security update it was blocking in #14794) from the dependency tree entirely.

References

Supersedes #14794, where the reviewer suggested this replacement.

Reviewer guidance

Check the docs CI job and the readthedocs build pass and produce valid output. Pages touched by this change to spot-check in the readthedocs preview: changelog, contributing/authors, contributing/code_of_conduct, and howtos/working_with_urls_and_api_endpoints (link targets at the bottom).

AI usage

Implemented with Claude Code; it verified the change with strict -W docs builds on Python 3.9 and 3.11 locally, and I reviewed the diff.

rtibbles and others added 2 commits June 5, 2026 10:43
The root-relative repo paths rendered as broken links on the built docs
site. myst-parser resolves document cross-references strictly, so they
also need to be correct for the build to pass once it replaces m2r2.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
m2r2 is unmaintained and pins old mistune versions, which blocked
dependabot's mistune security update in learningequality#14794. myst-parser handles
both of m2r2's jobs: parsing .md source files (the howtos) and
including markdown files in rst documents, via docutils' include
directive with the :parser: option in place of mdinclude.

This drops mistune from the dependency tree entirely.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@rtibbles rtibbles marked this pull request as ready for review June 5, 2026 18:14
@github-actions github-actions Bot added SIZE: medium DEV: backend Python, databases, networking, filesystem... labels Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DEV: backend Python, databases, networking, filesystem... SIZE: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant