Skip to content

Python 3.13.2 Compatibility Issue with vectorcall API #121

@brianfreud

Description

@brianfreud

Description

When attempting to install pyroaring on Python 3.13.2t, compilation fails due to issues with the Python C API's vectorcall functionality. Although version 1.0.0 includes PR #119 for Python 3.13 support, there appear to be additional API changes in Python 3.13.2t that aren't yet accounted for.

Environment

  • Python version: 3.13.2t
  • Installation method: pip install pyroaring
  • Operating system: Linux

Steps to Reproduce

  1. Use Python 3.13.2t
  2. Run pip install pyroaring

Error

The build fails with these key errors:

pyroaring/pyroaring.cpp:3094:80: error: '__pyx_vectorcallfunc' has not been declared
 3094 | static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw);
      |                                                                                ^~~~~~~~~~~~~~~~~~~~

pyroaring/pyroaring.cpp:66265:6: error: '__pyx_vectorcallfunc' was not declared in this scope; did you mean 'vectorcallfunc'?
66265 |      __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc);
      |      ^~~~~~~~~~~~~~~~~~~~
      |      vectorcallfunc

Possible Cause

The __pyx_vectorcallfunc type/macro is not properly defined for Python 3.13.2t. This might be due to changes in Python's C API between Python 3.13.0 (which PR #119 may have targeted) and Python 3.13.2t.

Potential Solutions

  1. Update the Cython wrappers to use the new vectorcall API correctly for Python 3.13.2
  2. Add appropriate typedefs or macro definitions to handle the API changes
  3. Add a conditional check for Python version to adjust for the API differences

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions