From 21cbc4a204efe49eb554dce44cc4ec6695193390 Mon Sep 17 00:00:00 2001 From: AZero13 Date: Mon, 8 Dec 2025 18:37:24 -0500 Subject: [PATCH 1/2] gh-142440: apply context to x, not v, in _decimal_Context_apply_impl V is not even defined here. --- .../2025-12-08-18-40-17.gh-issue-142438.tH-Y16.rst | 2 ++ Modules/_decimal/_decimal.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 Misc/NEWS.d/next/Core_and_Builtins/2025-12-08-18-40-17.gh-issue-142438.tH-Y16.rst diff --git a/Misc/NEWS.d/next/Core_and_Builtins/2025-12-08-18-40-17.gh-issue-142438.tH-Y16.rst b/Misc/NEWS.d/next/Core_and_Builtins/2025-12-08-18-40-17.gh-issue-142438.tH-Y16.rst new file mode 100644 index 00000000000000..5c1db433e1b14b --- /dev/null +++ b/Misc/NEWS.d/next/Core_and_Builtins/2025-12-08-18-40-17.gh-issue-142438.tH-Y16.rst @@ -0,0 +1,2 @@ +Fix _decimal builds configured with EXTRA_FUNCTIONALITY by correcting the +Context.apply wrapper to pass the right argument. diff --git a/Modules/_decimal/_decimal.c b/Modules/_decimal/_decimal.c index 0484d9896a1c17..2a6645c6911c6e 100644 --- a/Modules/_decimal/_decimal.c +++ b/Modules/_decimal/_decimal.c @@ -6990,7 +6990,7 @@ _decimal_Context_apply_impl(PyObject *context, PyTypeObject *cls, PyObject *x) /*[clinic end generated code: output=f8a7142d47ad4ff3 input=388e66ca82733516]*/ { - return _decimal_Context__apply(context, v); + return _decimal_Context__apply(context, x); } #endif From c7dd3cbcc2627fcbff68e2dfb29220eb49a0ab2f Mon Sep 17 00:00:00 2001 From: AZero13 Date: Wed, 10 Dec 2025 09:07:26 -0500 Subject: [PATCH 2/2] Move blurb to Library --- .../2025-12-08-18-40-17.gh-issue-142438.tH-Y16.rst | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Misc/NEWS.d/next/{Core_and_Builtins => Library}/2025-12-08-18-40-17.gh-issue-142438.tH-Y16.rst (100%) diff --git a/Misc/NEWS.d/next/Core_and_Builtins/2025-12-08-18-40-17.gh-issue-142438.tH-Y16.rst b/Misc/NEWS.d/next/Library/2025-12-08-18-40-17.gh-issue-142438.tH-Y16.rst similarity index 100% rename from Misc/NEWS.d/next/Core_and_Builtins/2025-12-08-18-40-17.gh-issue-142438.tH-Y16.rst rename to Misc/NEWS.d/next/Library/2025-12-08-18-40-17.gh-issue-142438.tH-Y16.rst