wbolster / plyvel

Plyvel, a fast and feature-rich Python interface to LevelDB
https://plyvel.readthedocs.io/
Other
531 stars 76 forks source link

Does not build against CPython 3.12 #158

Closed koniiiik closed 8 months ago

koniiiik commented 8 months ago

The build fails with the following errors:

  plyvel/_plyvel.cpp: In function ‘void __Pyx_Raise(PyObject*, PyObject*, PyObject*, PyObject*)’:
  plyvel/_plyvel.cpp:22836:36: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘curexc_traceback’
  22836 |         PyObject* tmp_tb = tstate->curexc_traceback;
        |                                    ^~~~~~~~~~~~~~~~
  plyvel/_plyvel.cpp:22839:21: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘curexc_traceback’
  22839 |             tstate->curexc_traceback = tb;
        |                     ^~~~~~~~~~~~~~~~
  plyvel/_plyvel.cpp: In function ‘int __Pyx_PyUnicode_Equals(PyObject*, PyObject*, int)’:
  plyvel/_plyvel.cpp:571:51: error: ‘_PyUnicode_Ready’ was not declared in this scope; did you mean ‘PyUnicode_READY’?
    571 |                                               0 : _PyUnicode_Ready((PyObject *)(op)))
        |                                                   ^~~~~~~~~~~~~~~~
  plyvel/_plyvel.cpp:966:43: note: in definition of macro ‘unlikely’
    966 |   #define unlikely(x) __builtin_expect(!!(x), 0)
        |                                           ^
  plyvel/_plyvel.cpp:23182:22: note: in expansion of macro ‘__Pyx_PyUnicode_READY’
  23182 |         if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
        |                      ^~~~~~~~~~~~~~~~~~~~~
  plyvel/_plyvel.cpp: In function ‘PyObject* __Pyx_PyUnicode_Join(PyObject*, Py_ssize_t, Py_ssize_t, Py_UCS4)’:
  plyvel/_plyvel.cpp:571:51: error: ‘_PyUnicode_Ready’ was not declared in this scope; did you mean ‘PyUnicode_READY’?
    571 |                                               0 : _PyUnicode_Ready((PyObject *)(op)))
        |                                                   ^~~~~~~~~~~~~~~~

and

  plyvel/_plyvel.cpp: In function ‘int __Pyx_PyInt_As_int(PyObject*)’:
  plyvel/_plyvel.cpp:25504:55: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
  25504 |             const digit* digits = ((PyLongObject*)x)->ob_digit;
        |                                                       ^~~~~~~~
  plyvel/_plyvel.cpp:25559:55: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
  25559 |             const digit* digits = ((PyLongObject*)x)->ob_digit;
        |                                                       ^~~~~~~~
  plyvel/_plyvel.cpp: In function ‘long int __Pyx_PyInt_As_long(PyObject*)’:
  plyvel/_plyvel.cpp:25700:55: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
  25700 |             const digit* digits = ((PyLongObject*)x)->ob_digit;
        |                                                       ^~~~~~~~
  plyvel/_plyvel.cpp:25755:55: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
  25755 |             const digit* digits = ((PyLongObject*)x)->ob_digit;
        |                                                       ^~~~~~~~
  plyvel/_plyvel.cpp: In function ‘size_t __Pyx_PyInt_As_size_t(PyObject*)’:
  plyvel/_plyvel.cpp:25934:55: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
  25934 |             const digit* digits = ((PyLongObject*)x)->ob_digit;
        |                                                       ^~~~~~~~
  plyvel/_plyvel.cpp:25989:55: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
  25989 |             const digit* digits = ((PyLongObject*)x)->ob_digit;
        |                                                       ^~~~~~~~
  plyvel/_plyvel.cpp: In function ‘Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*)’:
  plyvel/_plyvel.cpp:26516:47: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
  26516 |     const digit* digits = ((PyLongObject*)b)->ob_digit;
        |                                               ^~~~~~~~

Here's a full installation log: plyvel.txt

wbolster commented 8 months ago

seems this only requires regenerating the extension using a newer cython version.

should be fixed in plyvel 1.5.1 which i released just now