From f75ee546f3b094a9caaee8d0db32330de93983e9 Mon Sep 17 00:00:00 2001 From: Christian Veenhuis <124370897+ChVeen@users.noreply.github.com> Date: Mon, 14 Apr 2025 21:59:24 +0200 Subject: [PATCH 1/4] added missing w typecode --- Modules/arraymodule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c index 16f757feca3342..401a3a7072b846 100644 --- a/Modules/arraymodule.c +++ b/Modules/arraymodule.c @@ -2873,7 +2873,7 @@ array_new(PyTypeObject *type, PyObject *args, PyObject *kwds) } } PyErr_SetString(PyExc_ValueError, - "bad typecode (must be b, B, u, h, H, i, I, l, L, q, Q, f or d)"); + "bad typecode (must be b, B, u, w, h, H, i, I, l, L, q, Q, f or d)"); return NULL; } From bd8f50e4b1e894258816bc80c31afba37c26df5d Mon Sep 17 00:00:00 2001 From: Christian Veenhuis <124370897+ChVeen@users.noreply.github.com> Date: Mon, 14 Apr 2025 21:05:25 +0000 Subject: [PATCH 2/4] add NEWS entry --- .../next/Library/2025-04-14-23-00-00.gh-issue-132527.kTi8T7.rst | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 Misc/NEWS.d/next/Library/2025-04-14-23-00-00.gh-issue-132527.kTi8T7.rst diff --git a/Misc/NEWS.d/next/Library/2025-04-14-23-00-00.gh-issue-132527.kTi8T7.rst b/Misc/NEWS.d/next/Library/2025-04-14-23-00-00.gh-issue-132527.kTi8T7.rst new file mode 100644 index 00000000000000..f551e5e387f2a3 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2025-04-14-23-00-00.gh-issue-132527.kTi8T7.rst @@ -0,0 +1,2 @@ +Added the missing 'w' typecode to the error message which is issued by +array.array() if used with an unknown typecode like array('x'). From 6195a4014dc429c499c82bf296ecc5a0133d02a0 Mon Sep 17 00:00:00 2001 From: Christian Veenhuis <124370897+ChVeen@users.noreply.github.com> Date: Tue, 15 Apr 2025 11:07:38 +0200 Subject: [PATCH 3/4] update NEWS entry Co-authored-by: Terry Jan Reedy --- .../Library/2025-04-14-23-00-00.gh-issue-132527.kTi8T7.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Misc/NEWS.d/next/Library/2025-04-14-23-00-00.gh-issue-132527.kTi8T7.rst b/Misc/NEWS.d/next/Library/2025-04-14-23-00-00.gh-issue-132527.kTi8T7.rst index f551e5e387f2a3..c4c785f407f82d 100644 --- a/Misc/NEWS.d/next/Library/2025-04-14-23-00-00.gh-issue-132527.kTi8T7.rst +++ b/Misc/NEWS.d/next/Library/2025-04-14-23-00-00.gh-issue-132527.kTi8T7.rst @@ -1,2 +1 @@ -Added the missing 'w' typecode to the error message which is issued by -array.array() if used with an unknown typecode like array('x'). +Include valid typecode 'w' in the error message when an invalid typecode is passed to :class:`array.array`. From fb2b29ad5b808e3fc5dbc437353160a01666262c Mon Sep 17 00:00:00 2001 From: Christian Veenhuis <124370897+ChVeen@users.noreply.github.com> Date: Tue, 22 Apr 2025 15:11:11 +0200 Subject: [PATCH 4/4] add a "the" to the NEWS entry --- .../next/Library/2025-04-14-23-00-00.gh-issue-132527.kTi8T7.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Misc/NEWS.d/next/Library/2025-04-14-23-00-00.gh-issue-132527.kTi8T7.rst b/Misc/NEWS.d/next/Library/2025-04-14-23-00-00.gh-issue-132527.kTi8T7.rst index c4c785f407f82d..997cc2b784f7e6 100644 --- a/Misc/NEWS.d/next/Library/2025-04-14-23-00-00.gh-issue-132527.kTi8T7.rst +++ b/Misc/NEWS.d/next/Library/2025-04-14-23-00-00.gh-issue-132527.kTi8T7.rst @@ -1 +1 @@ -Include valid typecode 'w' in the error message when an invalid typecode is passed to :class:`array.array`. +Include the valid typecode 'w' in the error message when an invalid typecode is passed to :class:`array.array`.