From fd8f031536987fa14fb194fffacb262d80e84975 Mon Sep 17 00:00:00 2001 From: Dong-hee Na Date: Mon, 6 Feb 2023 13:58:00 +0900 Subject: [PATCH] =?UTF-8?q?gh-101372:=20Fix=20unicodedata.is=5Fnormalized?= =?UTF-8?q?=20to=20properly=20handle=20the=20UCD=203=E2=80=A6=20(gh-101388?= =?UTF-8?q?)=20(cherry=20picked=20from=20commit=209ef7e75434587fc8f167d73e?= =?UTF-8?q?ee5dd9bdca62714b)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Dong-hee Na --- .../2023-01-28-20-31-42.gh-issue-101372.8BcpCC.rst | 2 ++ Modules/unicodedata.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 Misc/NEWS.d/next/Core and Builtins/2023-01-28-20-31-42.gh-issue-101372.8BcpCC.rst 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 00000000000000..65a207e3f7e436 --- /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 64918115283d1a..3c3937f66c18ea 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)) {