From a809a48b35beeac550555c05343cfd40431b033d Mon Sep 17 00:00:00 2001 From: Pablo Galindo Date: Fri, 25 Apr 2025 17:08:09 +0100 Subject: [PATCH 1/2] gh-132950: Check fir Py_SUPPORTS_REMOTE_DEBUG in sys.is_remote_debug_enabled --- Python/sysmodule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Python/sysmodule.c b/Python/sysmodule.c index 3e0165acd6fb8c..54ecc1939a7065 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -2432,7 +2432,7 @@ static PyObject * sys_is_remote_debug_enabled_impl(PyObject *module) /*[clinic end generated code: output=7ca3d38bdd5935eb input=7335c4a2fe8cf4f3]*/ { -#ifndef Py_REMOTE_DEBUG +#if !definedPy_REMOTE_DEBUG) || !Py_SUPPORTS_REMOTE_DEBUG Py_RETURN_FALSE; #else const PyConfig *config = _Py_GetConfig(); From eb82877aaf3309c685670e32211118dc4e525b26 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 25 Apr 2025 18:13:04 +0200 Subject: [PATCH 2/2] Update Python/sysmodule.c --- Python/sysmodule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Python/sysmodule.c b/Python/sysmodule.c index 54ecc1939a7065..ba781fd5134cdc 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -2432,7 +2432,7 @@ static PyObject * sys_is_remote_debug_enabled_impl(PyObject *module) /*[clinic end generated code: output=7ca3d38bdd5935eb input=7335c4a2fe8cf4f3]*/ { -#if !definedPy_REMOTE_DEBUG) || !Py_SUPPORTS_REMOTE_DEBUG +#if !defined(Py_REMOTE_DEBUG) || !defined(Py_SUPPORTS_REMOTE_DEBUG) Py_RETURN_FALSE; #else const PyConfig *config = _Py_GetConfig();