Skip to content

Update dependency myst-parser to v5 - #202

Open
renovate[bot] wants to merge 1 commit into
devfrom
renovate/myst-parser-5.x
Open

renovate[bot] wants to merge 1 commit into
devfrom
renovate/myst-parser-5.x

Conversation

@renovate

@renovate renovate Bot commented Jan 17, 2026 •

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
myst-parser >=4.0.0,<5 → >=5.2,<6 age confidence

Release Notes

executablebooks/MyST-Parser (myst-parser)

v5.2.0

Compare Source

Heading anchors are now stable and documented:
one shared slug implementation with "github", "gitlab" and "docutils" presets,
slugs emitted as real HTML ids, explicit (target)= ids taking priority, and a versioned anchor contract.
Warnings and other tools now get accurate source lines (also inside {include}d files),
docutils 0.23 is supported, inputs that used to abort the build now warn instead,
and many fixes land for references, images, front matter, substitutions and directives;
a new section_ref extension links §1.1-style references to numbered headings.

Nothing is dropped: Python >=3.11, Sphinx >=8,<10 and the markdown-it-py requirement are unchanged,
mdit-py-plugins is raised to ~=0.7 (it was ~=0.6,>=0.6.1),
and the docutils range is widened to >=0.20,<0.24.
Some of these changes can still alter the output of a project that built before, so please read the upgrade notes.

‼️ Upgrade notes
  • Heading anchors (gh-pr:1158, gh-pr:1168), see :
    • Duplicate heading slugs now get fixed-base suffixes, x, x-1, x-2, as on GitHub;
      the third and later duplicates used to get x-1-2, x-1-2-3, ...
      So a link that uses the old slug of a third or later duplicate, such as [](#x-1-2), no longer resolves
      and warns (myst.xref_missing, which fails a -W build): change it to [](#x-2).

      Links to the first two duplicates are unchanged, and every HTML id a heading had before is kept.
    • Slugs are also emitted as secondary HTML ids on the rendered headings, so #slug links work in the published HTML.
      The docutils id stays the primary (first) id, so existing fragment links keep working.
      Set myst_heading_anchors_html_ids = False to emit only the docutils id.
    • An explicit (target)= placed before a heading becomes the section's primary id,
      which tocs, permalinks and objects.inv use; the implicit heading id is kept as a secondary anchor.
    • A heading whose slug is empty (a punctuation-only title, or any non-Latin title with the "docutils" preset) gets no anchor,
      and an empty fragment, [](#), now warns as unresolved.
    • Links that used to warn now resolve when the anchor exists:
      same-document links to implicit ids (such as headings deeper than myst_heading_anchors; under Sphinx only as a last resort),
      and cross-document links to label ids and to the implicit ids of headings within the myst_heading_anchors depth.
      [](doc.md#label) takes the target's title as its text (gh-pr:1207).
    • These rules (slug presets, deduplication, empty slugs, explicit-id priority and HTML ids) are now a documented contract,
      pinned by a versioned, language-agnostic corpus (tests/fixtures/slugs.json).
      myst_parser.mdit_to_docutils.base.default_slugify is deprecated in favour of myst_parser.slugs.github_slugify.
  • Directive option warnings (gh-pr:1164): each warning now points at the offending option's line,
    and unknown options are reported one per warning, as Unknown option key: 'x' (allowed: [...]),
    instead of one aggregate Unknown option keys: [...].
    The myst.directive_option subtype is unchanged, so suppress_warnings keeps working,
    but tests that match the old message need updating.
  • Directive API (gh-pr:1164): directives now receive the full fenced text as block_text, as in reStructuredText,
    so errors that echo it show the whole fence;
    and content_offset is -1 when the body starts on the opening line.
  • Source lines (gh-pr:1164, gh-pr:1169, gh-pr:1179): lines in warnings and nodes change where they were wrong.
    Text nodes no longer take the line of the most recent directive (so gettext .pot locations change),
    lines inside {include}d files are no longer one late,
    and the body of a directive with options and a trailing blank line is no longer one line off.
  • Front matter (gh-pr:1197): options that can only be set globally
    (heading_slug_func, update_mathjax, mathjax_classes, suppress_warnings, inventories)
    now warn (myst.topmatter) and are ignored in a document's front matter.
    This removes the undocumented per-document effect of inventories (docutils) and update_mathjax (Sphinx).
  • Rendered output:
    • parsed-literal keeps each line's indentation, and two trailing spaces no longer make a hard line break (gh-pr:1176);
    • $$ math blocks lose the blank lines at the start and end of their content, which broke LaTeX output (gh-pr:1224);
    • myst_links_external_new_tab writes rel="noreferrer" (it was misspelt noreferer),
      and no longer overwrites an authored target or rel (gh-pr:1200);
    • image alt text keeps backslash escapes and entities (gh-pr:1211),
      an HTML <img> keeps its alt text exactly, and a valueless alt is now empty rather than None (gh-pr:1214);
    • link titles are kept on links that go through cross-reference resolution (gh-pr:1196);
    • a footnote whose label equals a heading's name is now kept, rather than dropped with a warning (gh-pr:1157).
  • Packaging (gh-pr:1221): the distributions are now built with python -m build,
    so the sdists hold only the package, pyproject.toml, README.md and LICENSE
    (no longer CHANGELOG.md, tox.ini or .github/); the wheels are unaffected.
  • mdit-py-plugins 0.7 (gh-pr:1170): myst-parser and myst-docutils now require mdit-py-plugins>=0.7,<1.
✨ New Features
  • ✨ Stable heading anchors: one shared slug module (myst_parser.slugs), named presets for myst_heading_slug_func ("github", "gitlab"), slugs emitted as HTML ids (myst_heading_anchors_html_ids), explicit-id priority, fewer false warnings for working links, and myst-anchors --slug-func, by gh-user:chrisjsewell in gh-pr:1158
  • ✨ Add the "docutils" heading slug preset (byte-identical to docutils.nodes.make_id) and a versioned anchor contract, see , by gh-user:chrisjsewell in gh-pr:1168
  • ✨ Add the "section_ref" syntax extension: section-sign references such as §1, §1.1 and §2.3.4 link to the correspondingly numbered heading of the current document (numbered the same in docutils and Sphinx), with a suppressible myst.section_ref warning when no heading matches, see , by gh-user:chrisjsewell in gh-pr:1170
👌 Improvements
  • 👌 Report accurate source lines: directive option warnings point at their option, unknown options warn per key, first-line directive content is no longer one line off, text nodes get their own lines (gh-issue:546), directives receive the full block_text (superseding gh-pr:1048, thanks to gh-user:kdeldycke), and an include with :literal: gets its true line, by gh-user:chrisjsewell in gh-pr:1164
  • 👌 Allow a {table} caption to wrap onto the following lines, by gh-user:BetterAndBetterII in gh-pr:1195
  • 👌 Make a document's own front matter available to its substitutions, as env.metadata[env.docname], by gh-user:holmboe in gh-pr:1171
🐛 Bug Fixes
  • 🐛 Warn instead of aborting the build on hostile input (deeply nested HTML, malformed or hostile YAML front matter, YAML alias bombs), and keep a footnote whose label equals a heading's name, by gh-user:chrisjsewell in gh-pr:1157
  • 🐛 Fix small docutils renderer bugs: field bodies get source lines, a definition without a term no longer crashes, and linkify without linkify-it-py installed is disabled with a myst.linkify warning instead of crashing, by gh-user:chrisjsewell in gh-pr:1153
  • 🐛 Resolve [](doc.md#label) links to explicit targets in other documents without a false myst.xref_missing warning (gh-issue:1151, reported by gh-user:kdeldycke), using the target's title as the link text, by gh-user:dstrodtman in gh-pr:1207
  • 🐛 Keep link titles through cross-reference resolution, by gh-user:dylanpulver in gh-pr:1196
  • 🐛 Report exact source lines in {include}d files (also with :start-after: and a negative :start-line:), by gh-user:chrisjsewell, gh-user:dchaudhari7177, gh-user:vishalkaay and gh-user:Sanjays2402 in gh-pr:1169
  • 🐛 Keep validated front matter config values (enable_extensions, fence_as_directive, url_schemes), and reject global_only options in front matter, by gh-user:dchaudhari7177 in gh-pr:1197
  • 🐛 Fix a directive's body offset when its body ends in blank lines, by gh-user:dchaudhari7177 in gh-pr:1179
  • 🐛 Don't crash on nested YAML dates in front matter, by gh-user:00200200 in gh-pr:1205
  • 🐛 Fix sorting of mixed manual and auto-numbered footnotes, by gh-user:Sanjays2402 in gh-pr:1178
  • 🐛 Keep backslash escapes and entities in image alt text, by gh-user:Cherith1222 in gh-pr:1211
  • 🐛 Keep the literal alt text of HTML images (html_image), so a newline in an attribute can no longer inject a directive option, by gh-user:AryanRG in gh-pr:1214
  • 🐛 Preserve line indentation in parsed-literal directives, by gh-user:deepakganesh78 in gh-pr:1176
  • 🐛 Allow substitution keys that are not Jinja2 identifiers, such as {{foo-bar}}, by gh-user:agu2347 in gh-pr:1172
  • 🐛 attrs: warn instead of raising on an invalid aliased image attribute ({w=…}) or a duplicate heading {#id}, and fix the new-tab link attributes, by gh-user:chrisjsewell in gh-pr:1200
  • 🐛 Strip blank boundary lines from $$ math blocks, which broke LaTeX output, by gh-user:chrisjsewell in gh-pr:1224
  • 🐛 Send a User-Agent when fetching remote inventories, which Read the Docs rejected with HTTP 403, by gh-user:chrisjsewell in gh-pr:1223
  • 🐛 Allow setup_sphinx to run twice, so myst_parser and myst_nb can both be listed in extensions, by gh-user:chrisjsewell in gh-pr:1222
⬆️ Dependency Upgrades
  • ⬆️ Require mdit-py-plugins~=0.7, for its section_ref plugin, by gh-user:chrisjsewell in gh-pr:1170
  • ⬆️ Allow docutils 0.23 (docutils>=0.20,<0.24), reported by gh-user:befeleme in gh-issue:1152, by gh-user:chrisjsewell in gh-pr:1157
  • ⬆️ Update the testing extra's pygments requirement from <2.21 to <2.22 in gh-pr:1191
  • ⬆️ Allow flit_core 4 as the build backend (flit_core>=3.4,<5) in gh-pr:1185
📚 Documentation
  • 📚 Document percent-encoding spaces in inventory object names, by gh-user:sapunyangkut in gh-pr:1163
  • 📚 Drop the unsupported \[...\] and \(...\) math delimiters from the syntax reference, by gh-user:chrisjsewell in gh-pr:1220
  • 📚 Link to auto_mode in sphinx-autodoc2, by gh-user:nerdoc in gh-pr:1157 (from gh-pr:1032)
  • 📚 Render the docs' syntax examples with sphinx-syntax-example, by gh-user:chrisjsewell in gh-pr:1181
🔧 Internal / Maintenance
  • 🔧 Publish to PyPI with trusted publishing, by gh-user:chrisjsewell in gh-pr:1140, from distributions built and checked in CI, by gh-user:chrisjsewell in gh-pr:1221

Full Changelog: v5.1.0...v5.2.0

v5.1.0

Compare Source

✨ New Features
  • ✨ Add "alert" syntax extension for GFM alerts (e.g. > [!NOTE]), see by gh-user:chrisjsewell in gh-pr:1128
  • ✨ Add "gfm_autolink" syntax extension for GFM autolinks, see by gh-user:chrisjsewell in gh-pr:1128
  • ✨ Add myst_strikethrough_single_tilde config option to allow single tilde (~) for strikethrough by gh-user:chrisjsewell in gh-pr:1128
  • ✨ Add myst_colon_fence_exact_match config option to require the closing colon fence to have exactly the same number of colons as the opening, see by gh-user:chrisjsewell in gh-pr:1128
👌 Improvements
  • 👌 Update myst_gfm_only mode to use the unified gfm_plugin, which now includes GFM autolinks, alerts, and improved strikethrough/tasklist handling by gh-user:chrisjsewell in gh-pr:1128
  • 👌 Improve MathJax 4 compatibility for Sphinx 9 by gh-user:chrisjsewell in gh-pr:1110
  • 👌 Stop directive-option parsing at colon fences, fixing nested colon fence directives by gh-user:chrisjsewell in gh-pr:1133
🐛 Bug Fixes
  • 🐛 Use docname instead of source path in warning locations by gh-user:chrisjsewell in gh-pr:1114
  • 🐛 Correctly encode & in Markdown URLs by not HTML-escaping refuri by gh-user:chrisjsewell in gh-pr:1126
  • 🐛 Fix RemovedInSphinx10Warning for inventory item iteration by gh-user:chrisjsewell in gh-pr:1129
  • 🐛 Pin mdit-py-plugins>=0.6.1 for nested field list fix by gh-user:chrisjsewell in gh-pr:1134
⬆️ Dependency Upgrades
  • ⬆️ Upgrade to markdown-it-py~=4.2 and mdit-py-plugins~=0.6 by gh-user:chrisjsewell in gh-pr:1128
  • ⬆️ Update pygments requirement from <2.20 to <2.21 by gh-user:chrisjsewell in gh-pr:1117

Full Changelog: v5.0.0...v5.1.0

v5.0.0

Compare Source

This release significantly bumps the supported versions of core dependencies:

‼️ Breaking Changes

This release updates the minimum supported versions:

  • Python: >=3.11 (dropped Python 3.10, tests up to 3.14)
  • Sphinx: >=8,<10 (dropped Sphinx 7, added Sphinx 9)
  • Docutils: >=0.20,<0.23 (dropped docutils 0.19, added docutils 0.22)
  • markdown-it-py: ~=4.0 (upgraded from v3)
⬆️ Dependency Upgrades
  • ⬆️ Upgrade to markdown-it-py v4 by gh-user:chrisjsewell in gh-pr:1060
  • ⬆️ Drop Python 3.10 and Sphinx 7 by gh-user:chrisjsewell in gh-pr:1059
  • ⬆️ Drop docutils 0.19 by gh-user:chrisjsewell in gh-pr:1061
  • ⬆️ Add support for Python 3.14 by gh-user:chrisjsewell in gh-pr:1075
  • ⬆️ Support Sphinx v9 by gh-user:chrisjsewell in gh-pr:1076
  • ⬆️ Allow docutils 0.22 by gh-user:chrisjsewell in gh-pr:1084
👌 Improvements
  • 👌 Improve generation of meta nodes by gh-user:AA-Turner in gh-pr:1080
📚 Documentation
  • 📚 Fix typo in tables.md by gh-user:electricalgorithm in gh-pr:1034
  • 📚 Fix minor typo in cross-referencing.md by gh-user:krassowski in gh-pr:1036
🔧 Internal / Maintenance
  • 🔧 Update pre-commit by gh-user:chrisjsewell in gh-pr:1058
  • 🔧 Add AGENTS.md by gh-user:chrisjsewell in gh-pr:1083

Full Changelog: v4.0.1...v5.0.0


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate

renovate Bot commented Jan 17, 2026 •

Copy link
Copy Markdown
Contributor Author

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: uv.lock
Using CPython 3.15.2 interpreter at: /opt/containerbase/tools/python/3.15.2/bin/python3
error: No solution found when resolving dependencies for split (markers: python_full_version >= '3.12' and platform_python_implementation == 'PyPy')
  cause: Because myst-parser>=5.2.0 depends on sphinx>=8,<10 and pystatis:dev depends on myst-parser>=5.2, we can conclude that pystatis:dev depends on sphinx>=8,<10.
         And because pystatis:dev depends on sphinx>=7.0,<8.dev0 and your project requires pystatis:dev, we can conclude that your project's requirements are unsatisfiable.

hint: The resolution failed for an environment that is not the current one, consider limiting the environments with `tool.uv.environments`.

@coderabbitai

coderabbitai Bot commented Jan 17, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4ff2fc87-4f4f-431a-9953-bb6917fc7450

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@renovate
renovate Bot force-pushed the renovate/myst-parser-5.x branch from 5ed41b9 to 6cdd949 Compare March 10, 2026 22:40
@renovate renovate Bot changed the title Update dependency myst-parser to v5 chore(deps): update dependency myst-parser to v5 Mar 10, 2026
@renovate renovate Bot changed the title chore(deps): update dependency myst-parser to v5 Update dependency myst-parser to v5 Mar 13, 2026
@renovate renovate Bot changed the title Update dependency myst-parser to v5 chore(deps): update dependency myst-parser to v5 Mar 13, 2026
@renovate renovate Bot changed the title chore(deps): update dependency myst-parser to v5 Update dependency myst-parser to v5 Mar 19, 2026
@renovate renovate Bot changed the title Update dependency myst-parser to v5 chore(deps): update dependency myst-parser to v5 Mar 26, 2026
@renovate renovate Bot changed the title chore(deps): update dependency myst-parser to v5 Update dependency myst-parser to v5 Mar 27, 2026
@renovate renovate Bot changed the title Update dependency myst-parser to v5 chore(deps): update dependency myst-parser to v5 Mar 27, 2026
@renovate renovate Bot changed the title chore(deps): update dependency myst-parser to v5 Update dependency myst-parser to v5 Mar 31, 2026
@renovate
renovate Bot force-pushed the renovate/myst-parser-5.x branch from 6cdd949 to 5bec9dd Compare May 13, 2026 10:36
@renovate
renovate Bot force-pushed the renovate/myst-parser-5.x branch from 5bec9dd to a97490c Compare November 21, 2026 19:45

This branch has not been deployed

No deployments
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.

0 participants