Skip to content

Revert "Update pygments version constraint in pyproject.toml"#8979

Merged
mscolnick merged 1 commit into
mainfrom
revert-8921-patch-1
Apr 1, 2026
Merged

Revert "Update pygments version constraint in pyproject.toml"#8979
mscolnick merged 1 commit into
mainfrom
revert-8921-patch-1

Conversation

@mscolnick
Copy link
Copy Markdown
Contributor

Reverts #8921

This version of pygments is too new and going to break other consumers.

Copilot AI review requested due to automatic review settings April 1, 2026 18:41
@mscolnick mscolnick requested a review from akshayka as a code owner April 1, 2026 18:41
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
marimo-docs Ready Ready Preview, Comment Apr 1, 2026 6:42pm

Request Review

@mscolnick mscolnick added internal A refactor or improvement that is not user facing dependencies and removed internal A refactor or improvement that is not user facing labels Apr 1, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) and pymdown-extensions (>=10.15) in pyproject.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.

Comment thread marimo/_output/md.py
Comment on lines +56 to 59
# 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
)
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment thread Makefile
@@ -138,8 +138,7 @@ py-snapshots:
uv run --group test pytest \
tests/_server/templates/test_templates.py \
tests/_server/api/endpoints/test_export.py \
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Suggested change
tests/_server/api/endpoints/test_export.py \
tests/_server/api/endpoints/test_export.py \
tests/test_project_dependencies.py \

Copilot uses AI. Check for mistakes.
Comment thread pyproject.toml
# 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.
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
# Pinned to specific version for introduction of codeblock handling.
# Minimum version for introduction of required codeblock handling features.

Copilot uses AI. Check for mistakes.
@mscolnick mscolnick merged commit 82b0a68 into main Apr 1, 2026
56 of 60 checks passed
@mscolnick mscolnick deleted the revert-8921-patch-1 branch April 1, 2026 18:49
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 1, 2026

🚀 Development release published. You may be able to view the changes at https://marimo.app?v=0.22.1-dev19

VishakBaddur pushed a commit to VishakBaddur/marimo that referenced this pull request Apr 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants