Skip to content

gh-153227: Use a development version of Pygments#153228

Merged
hugovk merged 4 commits into
python:mainfrom
ZeroIntensity:docs/use-development-pygments
Jul 7, 2026
Merged

gh-153227: Use a development version of Pygments#153228
hugovk merged 4 commits into
python:mainfrom
ZeroIntensity:docs/use-development-pygments

Conversation

@ZeroIntensity

@ZeroIntensity ZeroIntensity commented Jul 6, 2026

Copy link
Copy Markdown
Member

uv decided to upgrade other dependencies in pylock.toml; I didn't see any failures, so I decided to leave it.

@ZeroIntensity ZeroIntensity added the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Jul 6, 2026
@ZeroIntensity ZeroIntensity added docs Documentation in the Doc dir skip news labels Jul 6, 2026
@github-project-automation github-project-automation Bot moved this to Todo in Docs PRs Jul 6, 2026
@ZeroIntensity

Copy link
Copy Markdown
Member Author

@hugovk Any advice on the CI failure here? I don't think pylock.toml likes installing from a VCS (might be a pip bug).

@hugovk

hugovk commented Jul 6, 2026

Copy link
Copy Markdown
Member

Perhaps if we use the archive instead of VCS?

pygments @ https://github.com/pygments/pygments/archive/2cad2642058441b59782a6a18f03c98c42d081f1.tar.gz

Comment thread Doc/requirements.txt
Comment on lines 6 to 11
# The Sphinx version is pinned so that new versions that introduce new warnings
# won't suddenly cause build failures. Updating the version is fine as long
# as no warnings are raised by doing so.
# Keep this version in sync with ``Doc/conf.py``.
pygments @ git+https://github.com/pygments/pygments@2cad2642058441b59782a6a18f03c98c42d081f1
sphinx<9.0.0

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This comment block applies to Sphinx, so move the pygments line further down.

And let's add a comment, something like:

# Temporary direct requirement,
# pending release of Pygments > 2.20.0
# https://github.com/pygments/pygments/discussions/3145
pygments @ etc

Comment thread Doc/pylock.toml
# uv pip compile requirements.txt --exclude-newer P14D --exclude-newer-package linklint=PT0S --exclude-newer-package python-docs-theme=PT0S --no-cache --output-file Doc/pylock.toml --python-version 3.12 --universal
lock-version = "1.0"
created-by = "uv"
requires-python = ">=3.12"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We did need to manually remove this line to workaround a packaging bug, but I think that might be fixed now. Let's leave this here and find out.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It failed in the CI the last time IIRC, right? In that case it's passing now!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes, the details are in #149058.

pypa/packaging#1178 was fixed in pypa/packaging#1179 but not actually released yet.

What fixed it is python/release-tools#394 changing our dev version from 3.15.0b1+ to 3.15.0b1+dev to comply with PEP 440.

That's only been applied to 3.15+, so 3.14 and older will need to keep requires-python until the next packaging release (and perhaps pip to vendor it).

We could also consider applying python/release-tools#394 to 3.14 and older.

Anyway, we only have this pylock.toml in 3.15+, and only need this pygments lazy fix for 3.15+, so we're all good :)

@read-the-docs-community

read-the-docs-community Bot commented Jul 6, 2026

Copy link
Copy Markdown

@ZeroIntensity

Copy link
Copy Markdown
Member Author

Perhaps if we use the archive instead of VCS?

That did it!

@StanFromIreland StanFromIreland left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We need to make sure we can definitely keep requires-python = ">=3.12" before landing this. I might be misremembering, so I’ll wait for Hugo. Otherwise, LGTM.

@hugovk hugovk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We need to make sure we can definitely keep requires-python = ">=3.12" before landing this. I might be misremembering, so I’ll wait for Hugo.

Yes we can, see: #153228 (comment).

Thanks!

@hugovk hugovk merged commit d066496 into python:main Jul 7, 2026
34 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs Jul 7, 2026
@miss-islington-app

Copy link
Copy Markdown

Thanks @ZeroIntensity for the PR, and @hugovk for merging it 🌮🎉.. I'm working now to backport this PR to: 3.15.
🐍🍒⛏🤖

@bedevere-app

bedevere-app Bot commented Jul 7, 2026

Copy link
Copy Markdown

GH-153254 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Jul 7, 2026
hugovk pushed a commit that referenced this pull request Jul 7, 2026
…153254)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip news

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants