Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
gh-101372: Fix unicodedata.is_normalized to properly handle the UCD 3…#101388
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Uh oh!
There was an error while loading.Please reload this page.
All ranges of characters are candidates for testing. Test scriptimportunicodedatawithopen('foo.out','w')asf:forxinrange(0x110000):forformin ('NFC','NFD','NFKC','NFKD'):norm=unicodedata.ucd_3_2_0.normalize(form,chr(x))ifnotunicodedata.ucd_3_2_0.is_normalized(form,norm):f.write(f'{str(x)},{form}\n') AS-IS
TO-BE
|
@serhiy-storchaka I will merge this PR by next week, please let me know if there need some changes |
I am not happy with provided tests. Testing all range of Unicode characters is slow (few seconds on my computer), it should be decorated with The test for multicharacter string is not what I meant. It should not only test all normalized sequences, but also non-normalized sequences. For example, I tried to write more interesting tests for I propose to merge your PR without tests. The bugfix itself is obvious, and the tests I will add later. |
corona10 commentedFeb 6, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Okay got it, Please let me know once you submit the patch for test codes. I may learn a lot from the patch. |
Thanks@corona10 for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11. |
bedevere-bot commentedFeb 6, 2023
GH-101597 is a backport of this pull request to the3.11 branch. |
… UCD 3… (pythongh-101388)(cherry picked from commit9ef7e75)Co-authored-by: Dong-hee Na <donghee.na@python.org>
bedevere-bot commentedFeb 6, 2023
GH-101598 is a backport of this pull request to the3.10 branch. |
… UCD 3… (pythongh-101388)(cherry picked from commit9ef7e75)Co-authored-by: Dong-hee Na <donghee.na@python.org>
Uh oh!
There was an error while loading.Please reload this page.
….2.0