Skip to content

[3.15] gh-156444: Fix a negated character set with IGNORECASE and LOCALE (GH-156445) - #156456

Open
miss-islington wants to merge 1 commit into
python:3.15from
miss-islington:backport-6671d27-3.15
Open

[3.15] gh-156444: Fix a negated character set with IGNORECASE and LOCALE (GH-156445)#156456
miss-islington wants to merge 1 commit into
python:3.15from
miss-islington:backport-6671d27-3.15

Conversation

@miss-islington

@miss-islington miss-islington commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

charset_loc_ignore() tested the whole set once per locale case and took
the disjunction, which complements a set before closing it under case
instead of after: [bc] matched b'B', but so did [^bc]. Match both cases
of the character against every set member instead.
(cherry picked from commit 6671d27)

Co-authored-by: Serhiy Storchaka storchaka@gmail.com
Co-authored-by: Claude Opus 5 (1M context) noreply@anthropic.com

…LE (pythonGH-156445)

charset_loc_ignore() tested the whole set once per locale case and took
the disjunction, which complements a set before closing it under case
instead of after: [bc] matched b'B', but so did [^bc].  Match both cases
of the character against every set member instead.
(cherry picked from commit 6671d27)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.

2 participants