Uh oh!
There was an error while loading. Please reload this page.
gh-101372: Fix unicodedata.is_normalized to properly handle the UCD 3… - #101388
Conversation
Uh oh!
There was an error while loading. Please reload this page.
corona10
commented
Jan 28, 2023
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-ISTO-BE |
corona10
commented
Feb 3, 2023
@serhiy-storchaka I will merge this PR by next week, please let me know if there need some changes |
serhiy-storchaka
commented
Feb 5, 2023
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. |
Okay got it, Please let me know once you submit the patch for test codes. I may learn a lot from the patch. |
miss-islington
commented
Feb 6, 2023
Thanks @corona10 for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11. |
bedevere-bot
commented
Feb 6, 2023
GH-101597 is a backport of this pull request to the 3.11 branch. |
… UCD 3… (pythongh-101388) (cherry picked from commit 9ef7e75) Co-authored-by: Dong-hee Na <donghee.na@python.org>
bedevere-bot
commented
Feb 6, 2023
GH-101598 is a backport of this pull request to the 3.10 branch. |
… UCD 3… (pythongh-101388) (cherry picked from commit 9ef7e75) Co-authored-by: Dong-hee Na <donghee.na@python.org>
….2.0