Repository navigation
🔧 MAINTAIN: require markdown-it-py >= 3.0, test the floor and Python 3.14 - #170
Merged
Merged
Conversation
…3.14 The declared floor was markdown-it-py 2.0, but `subscript` has failed to import on 2.x since 0.5.0 (`EnvType`). Raise it to 3.0.0 and test it: - pyproject: `markdown-it-py>=3.0.0,<5.0.0`; classifiers for Python 3.10 to 3.14 (3.8 and 3.9 were already excluded by `requires-python`). - CI: a 3.14 cell, and a `tests-floor` job on Python 3.10 with markdown-it-py 3.0.0 (required by `allgood` and `publish`). - tests: test_gfm, test_gfm_autolink and test_section_ref skip below markdown-it-py 4.1.0, which those plugins need. Their version guards move to test_mdit_version_guard.py, which runs on every version and, below 4.1.0, checks that each plugin raises its RuntimeError. - pre-commit: mypy checks against markdown-it-py ~=4.2; tox gains py314.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #170 +/- ##
==========================================
+ Coverage 92.80% 94.66% +1.86%
==========================================
Files 31 40 +9
Lines 1835 2325 +490
==========================================
+ Hits 1703 2201 +498
+ Misses 132 124 -8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
chrisjsewell
added a commit
that referenced
this pull request
Nov 10, 2026
chrisjsewell
added a commit
that referenced
this pull request
Nov 10, 2026
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.
The package declares
markdown-it-py>=2.0.0,<5.0.0, but that floor is not true:with markdown-it-py 2.x,
import mdit_py_plugins.subscriptfails (ImportError: cannot import name 'EnvType').This raises the floor to 3.0.0 and adds a CI job that tests it, so it stays true.
Changes
pyproject.toml:markdown-it-py>=3.0.0,<5.0.0, and classifiers for Python 3.10 to 3.14(3.8 and 3.9 were already excluded by
requires-python = ">=3.10").testsmatrix,and a
tests-floorjob that installsmarkdown-it-py==3.0.0on Python 3.10 and runs the suite.It is a separate job rather than a matrix entry so that the existing
tests (…)check names do not change;allgoodandpublishboth need it.gfm,gfm_autolinkandsection_refneed markdown-it-py >= 4.1.0 and raiseRuntimeErroron older versions,so
test_gfm.py,test_gfm_autolink.pyandtest_section_ref.pynow skip below 4.1.0 (pytest.importorskip(..., minversion="4.1.0")).The version guards are tested in a new
test_mdit_version_guard.py, which runs on every version:below 4.1.0 it checks that each of the three plugins raises its
RuntimeError,and the existing simulated
section_refguard test moved there unchanged.markdown-it-py~=4.2(was~=3.0); no source changes were needed.py314environment.Checks run
pyteston Python 3.14 with markdown-it-py 4.2.0: 728 passed, 3 skipped (the below-4.1 guard checks), 1 xfailed.pyteston Python 3.10 with markdown-it-py 3.0.0: 648 passed, 3 skipped (the three modules above), 1 xfailed.Removing the skip from
test_section_ref.pymakes 44 tests fail with theRuntimeError, so the skip is what keeps that job green.pre-commit run --all-files: clean.python -m buildandtwine check --strict: both distributions pass;the wheel's metadata says
Requires-Dist: markdown-it-py>=3.0.0,<5.0.0.