fix(pre-commit.ci): pin pyupgrade to Python 3.13 to avoid crash on 3.14#2824
Open
bhimrazy wants to merge 1 commit into
Open
fix(pre-commit.ci): pin pyupgrade to Python 3.13 to avoid crash on 3.14#2824bhimrazy wants to merge 1 commit into
bhimrazy wants to merge 1 commit into
Conversation
pyupgrade v3.21.0 crashes on Python 3.14 due to a breaking change in `tokenize.cookie_re` (bytes pattern vs string-like object). Pin `language_version: python3.13` on the hook so pre-commit.ci uses a stable interpreter until pyupgrade adds 3.14 support.
k223kim
approved these changes
May 28, 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.
What does this PR do?
Pins
language_version: python3.13on thepyupgradepre-commit hook.pyupgrade v3.21.0crashes on Python 3.14 with:This is caused by a breaking change in
tokenize.cookie_rein Python 3.14. pre-commit.ci runs on 3.14, so every PR is currently failing theUpgrade codehook regardless of what changed.Seen failing here: https://results.pre-commit.ci/run/github/773894671/1779979956.EqEwjW5-S9KLbyBMT9nrAA
Pinning to
python3.13keeps the hook stable until pyupgrade ships 3.14 support upstream.