Revert "Update pygments version constraint in pyproject.toml"#8979
Conversation
This reverts commit 40f32eb.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
Reverts a previous dependency bump by lowering the minimum pygments and pymdown-extensions versions to avoid breaking downstream consumers, and updates related snapshot/test tooling and markdown processing behavior.
Changes:
- Revert dependency constraints for
pygments(>=2.19) andpymdown-extensions(>=10.15) inpyproject.toml. - Update the dependency snapshot to reflect the reverted constraints.
- Adjust
mo.md’s pycon fenced-code detection logic and tweak the snapshot update Makefile target.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
pyproject.toml |
Reverts pygments / pymdown-extensions lower bounds. |
tests/snapshots/dependencies.txt |
Updates the pinned dependency snapshot to match pyproject.toml. |
marimo/_output/md.py |
Changes pycon fenced-code detection preprocessor priority and regex behavior. |
Makefile |
Removes tests/test_project_dependencies.py from the py-snapshots target. |
| # Pattern to match fenced code blocks | ||
| self.fence_pattern = re.compile( | ||
| r"^(\s*)(```+|~~~+)(\w*)\s*\n(.*?)^\s*\2\s*$", | ||
| re.MULTILINE | re.DOTALL, | ||
| r"^(\s*)```(\w*)\s*\n(.*?)^(\s*)```\s*$", re.MULTILINE | re.DOTALL | ||
| ) |
There was a problem hiding this comment.
PyconDetectorPreprocessor’s fence_pattern was simplified to only match exactly triple backticks (), and no longer supports tilde fences (`~~~`) or longer fences (````/````` etc.). This regresses pycon detection for valid Markdown fences commonly used for nesting, and the previous implementation also ensured the closing fence matched the opening fence marker/length. Consider restoring support for +/~~~+ and using a backreference so the closing fence matches the opener, and preserve the original fence marker/length in the replacement output.
| @@ -138,8 +138,7 @@ py-snapshots: | |||
| uv run --group test pytest \ | |||
| tests/_server/templates/test_templates.py \ | |||
| tests/_server/api/endpoints/test_export.py \ | |||
There was a problem hiding this comment.
make py-snapshots no longer runs tests/test_project_dependencies.py, but this PR updates tests/snapshots/dependencies.txt via that test. Omitting it makes the snapshot-update target incomplete and forces contributors to remember to run extra commands to refresh dependency snapshots. Please add tests/test_project_dependencies.py back to the py-snapshots target (or provide an alternative documented snapshot update path).
| tests/_server/api/endpoints/test_export.py \ | |
| tests/_server/api/endpoints/test_export.py \ | |
| tests/test_project_dependencies.py \ |
| # add features to markdown | ||
| # 10.21.2+ required for compatibility with pygments>=2.20 (filename=None fix). | ||
| "pymdown-extensions>=10.21.2,<11", | ||
| # Pinned to specific version for introduction of codeblock handling. |
There was a problem hiding this comment.
The comment above the pymdown-extensions requirement says it’s “Pinned to specific version”, but the specifier is a range (>=10.15,<11). This is misleading for dependency management. Please update the comment to reflect that it’s a minimum bound (and briefly state why that minimum is required) or actually pin the version if that’s the intent.
| # Pinned to specific version for introduction of codeblock handling. | |
| # Minimum version for introduction of required codeblock handling features. |
|
🚀 Development release published. You may be able to view the changes at https://marimo.app?v=0.22.1-dev19 |
Reverts #8921
This version of
pygmentsis too new and going to break other consumers.