From 0faddb547f4802b201b4eb8d09ba210b2032b9fb Mon Sep 17 00:00:00 2001 From: da-woods Date: Thu, 14 Apr 2022 20:44:26 +0100 Subject: [PATCH] Disable CYTHON_FAST_PYCALL on Py3.10 (0.29.x) It causes issues while profiling or debugging where global variabels can end up inadvertently changed. Fixes #4609 --- Cython/Utility/ModuleSetupCode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Cython/Utility/ModuleSetupCode.c b/Cython/Utility/ModuleSetupCode.c index 65fbb921599..2f9a4403d71 100644 --- a/Cython/Utility/ModuleSetupCode.c +++ b/Cython/Utility/ModuleSetupCode.c @@ -192,7 +192,8 @@ #ifndef CYTHON_FAST_PYCALL // Python 3.11 deleted localplus argument from frame object, which is used in our // fast_pycall code - #define CYTHON_FAST_PYCALL (PY_VERSION_HEX < 0x030B00A1) + // On Python 3.10 is causes issues when used while profiling + #define CYTHON_FAST_PYCALL (PY_VERSION_HEX < 0x030A0000) #endif #ifndef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)