-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
gh-123682: Fix Unicode category check #123683
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
gh-123682: Fix Unicode category check #123683
Conversation
495bb25
to
52fa7be
Compare
52fa7be
to
0ab70cf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
cc @ambv
Ah, you have to update test_pyrepl:
|
Oops! Hmm, I think that needs more attention than just in the tests. The second failure is because the ZWJ is in category The first failure looks more serious. The proximate cause is (I think) the missing newline (also in I think overall this means that a category check might not be the right way to express the intent of the original code. @pablogsal, do you mind chiming in here? My understanding of this check is that it's meant to filter out control characters like what's in C0 and C1, but it seems like some of those characters are not wanted in this predicate, so just testing |
tests fail, the current change looks wrong in fact
This changeset fixes the faulty predicate identified by #123682 when testing if an input character is in one of the Unicode
Other
categoriesI assume this doesn't need a news fragment, but if I'm wrong, let me know and I'll add one.
(Sorry about the force-push chatter, I started this branch from an unrelated commit 😬)
_pyrepl.input.KeymapTranslator
tests for non-existent Unicode category #123682