Skip to content

fix: only ASCII allowed in local version#1102

Open
henryiii wants to merge 1 commit intopypa:mainfrom
henryiii:henryiii/fix/asciilocal
Open

fix: only ASCII allowed in local version#1102
henryiii wants to merge 1 commit intopypa:mainfrom
henryiii:henryiii/fix/asciilocal

Conversation

@henryiii
Copy link
Contributor

@henryiii henryiii commented Mar 6, 2026

This is an alternative to and closes #470. Tests come from that PR.

Starting in Python 3.6, you can add a flag to a subsection of a regex, so we can make the matches ASCII-only without changing the surrounding whitespace matching. I'm not sure why we support non-ASCII whitespace, but this keeps support. I've added it several places where only ASCII is supported.

I expect this might be a tiny bit faster, since it's a simpler regex match, but not measurably so.

@henryiii henryiii force-pushed the henryiii/fix/asciilocal branch from 5ba0fd5 to eaf0d8b Compare March 6, 2026 18:06
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
Co-authored-by: Jan Kaliszewski <zuo@kaliszewski.net>
@henryiii henryiii force-pushed the henryiii/fix/asciilocal branch from eaf0d8b to 8f75707 Compare March 7, 2026 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant