]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-149879: Fix test_capi on Cygwin (#150252)
authorVictor Stinner <vstinner@python.org>
Fri, 22 May 2026 19:47:32 +0000 (21:47 +0200)
committerGitHub <noreply@github.com>
Fri, 22 May 2026 19:47:32 +0000 (21:47 +0200)
Fix Test_Pep523AllowSpecialization tests of test_capi.test_misc.

On Cygwin, _PyEval_EvalFrameDefault in _testinternalcapi is not the
same as _PyEval_EvalFrameDefault in python.exe. So pass NULL
explicitly to use the default function (_PyEval_EvalFrameDefault).

Modules/_testinternalcapi.c

index 088f0e46c6c65877f1e6ab34ca597bf746a072c3..d0d1f1f1bc8e53e804bea402cd71c07c79150bc4 100644 (file)
@@ -1112,7 +1112,7 @@ static PyObject *
 set_eval_frame_default(PyObject *self, PyObject *Py_UNUSED(args))
 {
     module_state *state = get_module_state(self);
-    _PyInterpreterState_SetEvalFrameFunc(_PyInterpreterState_GET(), _PyEval_EvalFrameDefault);
+    _PyInterpreterState_SetEvalFrameFunc(_PyInterpreterState_GET(), NULL);
     Py_CLEAR(state->record_list);
     Py_RETURN_NONE;
 }