Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.1k
Closed
Description
numpy 1.25.1 fails to build on Python 3.13: Cython uses private C API removed in Python 3.13. Example of build errors.
I open an issue since Python 3.13 does not provide obvious replacement for these removed functions.
(1) Cython uses removed_PyInterpreterState_GetConfig():
staticvoid__Pyx_init_assertions_enabled(void) {__pyx_assertions_enabled_flag= !_PyInterpreterState_GetConfig(__Pyx_PyThreadState_Current->interp)->optimization_level; }
(2) Cython uses removed_PyVectorcall_Function() in __Pyx_PyObject_FastCallDict():
staticCYTHON_INLINEPyObject*__Pyx_PyObject_FastCallDict(PyObject*func,PyObject**args,size_t_nargs,PyObject*kwargs) { ..#ifCYTHON_VECTORCALLvectorcallfuncf=_PyVectorcall_Function(func);if (f) {returnf(func,args, (size_t)nargs,kwargs); } ...}
(3) Cython uses removed_PyUnicode_FastCopyCharacters() in __Pyx_PyUnicode_ConcatInPlaceImpl()
staticCYTHON_INLINEPyObject*__Pyx_PyUnicode_ConcatInPlaceImpl(PyObject**p_left,PyObject*right#ifCYTHON_REFNANNY ,void*__pyx_refnanny#endif ) { ...// copy 'right' into the newly allocated area of 'left'_PyUnicode_FastCopyCharacters(*p_left,left_len,right,0,right_len);return*p_left; ... }
But also in __Pyx_PyUnicode_Join():
staticPyObject*__Pyx_PyUnicode_Join(PyObject*value_tuple,Py_ssize_tvalue_count,Py_ssize_tresult_ulength,Py_UCS4max_char) { ...#ifCYTHON_COMPILING_IN_CPYTHON&&PY_VERSION_HEX >=0x030300F0|| defined(_PyUnicode_FastCopyCharacters)_PyUnicode_FastCopyCharacters(result_uval,char_pos,uval,0,ulength);#else ...}