馃悰 fix(ci): suppress Pygments DeprecationWarning on Python 3.15 - #3733
Merged
Conversation
Python 3.15 deprecated os.path.commonprefix() and Pygments 2.19.2 calls it internally. With filterwarnings = "error" in pytest config, this causes an INTERNALERROR crashing the entire test suite on Python 3.15 across all platforms.
gaborbernat
force-pushed
the
fix-pygments-py315
branch
from
February 17, 2026 21:11
6306496 to
e10b3bc
Compare
gaborbernat
enabled auto-merge (squash)
February 17, 2026 21:12
for more information, see https://pre-commit.ci
gaborbernat
added a commit
that referenced
this pull request
Feb 17, 2026
$(cat <<EOF ## Summary - The `:pygments` module scope on the `os.path.commonprefix()` deprecation filter from #3733 never matched because the warning is raised from `<frozen genericpath>` (stdlib), not from the calling library - Drop the module scope so the filter actually suppresses the warning - Add upstream issue link for pyproject-hooks which also uses `commonprefix` Upstream issues: - pygments/pygments#3039 - pypa/pyproject-hooks#223 ## Test plan - [ ] CI passes on Python 3.15 without `INTERNALERROR` 馃 Generated with [Claude Code](https://claude.com/claude-code) EOF )
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.
Python 3.15 deprecated
os.path.commonprefix()and Pygments 2.19.2 calls it internally in its regex optimization. Withfilterwarnings = "error"in the pytest config, thisDeprecationWarninggets promoted to an error, causing a pytestINTERNALERRORthat crashes the entire test suite on Python 3.15 across all platforms (ubuntu, macos, windows).The fix adds a targeted warning filter to suppress this specific deprecation from the stdlib
genericpathmodule until Pygments releases a fix upstream.