From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Mon, 6 Feb 2023 10:32:30 +0000 (-0800) Subject: gh-101372: Fix unicodedata.is_normalized to properly handle the UCD 3… (gh-101388) X-Git-Tag: v3.11.2~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9bd000c7b82142a6ebed5b0d5fcb4a7188a43b27;p=thirdparty%2FPython%2Fcpython.git gh-101372: Fix unicodedata.is_normalized to properly handle the UCD 3… (gh-101388) (cherry picked from commit 9ef7e75434587fc8f167d73eee5dd9bdca62714b) Co-authored-by: Dong-hee Na --- diff --git a/Misc/NEWS.d/next/Core and Builtins/2023-01-28-20-31-42.gh-issue-101372.8BcpCC.rst b/Misc/NEWS.d/next/Core and Builtins/2023-01-28-20-31-42.gh-issue-101372.8BcpCC.rst new file mode 100644 index 000000000000..65a207e3f7e4 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2023-01-28-20-31-42.gh-issue-101372.8BcpCC.rst @@ -0,0 +1,2 @@ +Fix :func:`~unicodedata.is_normalized` to properly handle the UCD 3.2.0 +cases. Patch by Dong-hee Na. diff --git a/Modules/unicodedata.c b/Modules/unicodedata.c index 64918115283d..3c3937f66c18 100644 --- a/Modules/unicodedata.c +++ b/Modules/unicodedata.c @@ -803,7 +803,7 @@ is_normalized_quickcheck(PyObject *self, PyObject *input, bool nfc, bool k, { /* UCD 3.2.0 is requested, quickchecks must be disabled. */ if (UCD_Check(self)) { - return NO; + return MAYBE; } if (PyUnicode_IS_ASCII(input)) {