From dadaadc2ec8fb7595069e3ed89ea2223cb9209bd Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Fri, 28 Nov 2025 15:29:36 +0100 Subject: [PATCH 1/2] gh-142038: Expand guard for types_world_is_stopped to fix debug builds without assertions --- Objects/typeobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Objects/typeobject.c b/Objects/typeobject.c index 4c6ff51493f799..53f382d7cdcdf5 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -81,7 +81,7 @@ class object "PyObject *" "&PyBaseObject_Type" #define END_TYPE_DICT_LOCK() Py_END_CRITICAL_SECTION2() -#ifndef NDEBUG +#if !defined(NDEBUG) || defined(Py_Debug) // Return true if the world is currently stopped. static bool types_world_is_stopped(void) From a0f799899221a51c347ba12d40d42491c00db177 Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Fri, 28 Nov 2025 18:40:07 +0100 Subject: [PATCH 2/2] Py_Debug -> Py_DEBUG --- Objects/typeobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Objects/typeobject.c b/Objects/typeobject.c index 53f382d7cdcdf5..cbe0215359e29d 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -81,7 +81,7 @@ class object "PyObject *" "&PyBaseObject_Type" #define END_TYPE_DICT_LOCK() Py_END_CRITICAL_SECTION2() -#if !defined(NDEBUG) || defined(Py_Debug) +#if !defined(NDEBUG) || defined(Py_DEBUG) // Return true if the world is currently stopped. static bool types_world_is_stopped(void)