[Python-checkins] gh-101372: Fix unicodedata.is_normalized to properly handle the UCD 3… (gh-101388)

miss-islington webhook-mailer at python.org
Mon Feb 6 05:33:05 EST 2023


https://github.com/python/cpython/commit/33250297411d38c16e0a4df1831edd17e5de8616
commit: 33250297411d38c16e0a4df1831edd17e5de8616
branch: 3.10
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2023-02-06T02:32:58-08:00
summary:

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 <donghee.na at python.org>

files:
A Misc/NEWS.d/next/Core and Builtins/2023-01-28-20-31-42.gh-issue-101372.8BcpCC.rst
M Modules/unicodedata.c

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 f87eb6087989..517eb4842f86 100644
--- a/Modules/unicodedata.c
+++ b/Modules/unicodedata.c
@@ -805,7 +805,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;
     }
 
     Py_ssize_t i, len;



More information about the Python-checkins mailing list