https://github.com/python/cpython/commit/59abdf82073c5a431ec1a3a6f0ba6edfdf7a3e1c
commit: 59abdf82073c5a431ec1a3a6f0ba6edfdf7a3e1c
branch: main
author: Sergey B Kirpichev <[email protected]>
committer: zware <[email protected]>
date: 2026-06-01T13:41:21-05:00
summary:
gh-115119: Remove superfluous TEST_COVERAGE private macro from _decimal module
(GH-149756)
It was previously shared with `libmpdec`, which is no longer vendored.
files:
M Modules/_decimal/_decimal.c
M configure
M configure.ac
diff --git a/Modules/_decimal/_decimal.c b/Modules/_decimal/_decimal.c
index 2760792a3fe18ed..4db1b60be77844d 100644
--- a/Modules/_decimal/_decimal.c
+++ b/Modules/_decimal/_decimal.c
@@ -188,7 +188,7 @@ find_state_ternary(PyObject *left, PyObject *right,
PyObject *modulus)
* sizeof(size_t) == sizeof(mpd_uint_t) == sizeof(mpd_ssize_t)
*/
-#ifdef TEST_COVERAGE
+#ifdef Py_DEBUG
#undef Py_LOCAL_INLINE
#define Py_LOCAL_INLINE Py_LOCAL
#endif
diff --git a/configure b/configure
index 81862372f7d7774..94735c8d018a1f7 100755
--- a/configure
+++ b/configure
@@ -16593,12 +16593,6 @@ printf "%s\n" "yes" >&6; }
have_mpdec=yes
fi
-# Disable forced inlining in debug builds, see GH-94847
-if test "x$with_pydebug" = xyes
-then :
- as_fn_append LIBMPDEC_CFLAGS " -DTEST_COVERAGE"
-fi
-
# Check whether _decimal should use a coroutine-local or thread-local context
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for
--with-decimal-contextvar" >&5
printf %s "checking for --with-decimal-contextvar... " >&6; }
diff --git a/configure.ac b/configure.ac
index c8dce3fd49bda16..9192211c7c1871d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4398,11 +4398,6 @@ PKG_CHECK_MODULES([LIBMPDEC], [libmpdec >= 2.5.0],
[have_mpdec=yes], [
])
])
-# Disable forced inlining in debug builds, see GH-94847
-AS_VAR_IF(
- [with_pydebug], [yes],
- [AS_VAR_APPEND([LIBMPDEC_CFLAGS], [" -DTEST_COVERAGE"])])
-
# Check whether _decimal should use a coroutine-local or thread-local context
AC_MSG_CHECKING([for --with-decimal-contextvar])
AC_ARG_WITH(
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]