gh-149879: Fix test_capi on Cygwin (#150252)

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).
This commit is contained in:
Victor Stinner 2026-05-22 21:47:32 +02:00 committed by GitHub
parent 8115360153
commit e020836fd4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View 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;
}