summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDong-hee Na <donghee.na@python.org>2023-02-06 04:58:00 (GMT)
committerGitHub <noreply@github.com>2023-02-06 04:58:00 (GMT)
commit9ef7e75434587fc8f167d73eee5dd9bdca62714b (patch)
tree958f4c93bdf4ae6d3aea0f6cd96888412cec70d0
parentef7c2bfcf1fd618438f981ace64499a99ae9fae0 (diff)
downloadcpython-9ef7e75434587fc8f167d73eee5dd9bdca62714b.zip
cpython-9ef7e75434587fc8f167d73eee5dd9bdca62714b.tar.gz
cpython-9ef7e75434587fc8f167d73eee5dd9bdca62714b.tar.bz2
gh-101372: Fix unicodedata.is_normalized to properly handle the UCD 3… (gh-101388)
-rw-r--r--Misc/NEWS.d/next/Core and Builtins/2023-01-28-20-31-42.gh-issue-101372.8BcpCC.rst2
-rw-r--r--Modules/unicodedata.c2
2 files changed, 3 insertions, 1 deletions
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 0000000..65a207e
--- /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 59fccd4..c108f14 100644
--- a/Modules/unicodedata.c
+++ b/Modules/unicodedata.c
@@ -800,7 +800,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)) {