Skip to content

[3.14] gh-163121: Fix _= in a class pattern after a positional pattern (GH-163126) - #163165

Open
miss-islington wants to merge 1 commit into
python:3.14from
miss-islington:backport-81d9755-3.14
Open

miss-islington wants to merge 1 commit into
python:3.14from
miss-islington:backport-81d9755-3.14

Conversation

@miss-islington

@miss-islington miss-islington commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

…rn (pythonGH-163126)

(cherry picked from commit 81d9755)

Co-authored-by: Robert Joseph <robujsph2001@gmail.com>
@gvanrossum
gvanrossum enabled auto-merge (squash) December 4, 2026 20:07
@Robertboy18

Copy link
Copy Markdown
Contributor

@gvanrossum the lint failure here is Ruff 0.15.4, which 3.14 pins, not accepting _ as a keyword name in a class pattern (astral-sh/ruff#31300, still open). Main and 3.15 already skip test_patma.py in Lib/test/.ruff.toml (added for the unary plus pattern in gh-145239), so adding the same line on 3.14 should fix it. With that line, Ruff skips test_patma.py locally and the four parser errors disappear. Happy to open a manual backport with it if that's easier :)

@gvanrossum

Copy link
Copy Markdown
Member

Sigh. No good deed goes unpunished. :-)

A PR just for the 3.14 branch to fix the ruff config makes sense.

Hopefully at some point we can move to a newer ruff version and remove this hack -- but that's a bigger task and should only happen on main.

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