tomerfiliba-org/reedsolomon

python 3.10 installation issue

Warter21 opened this issue · 6 comments

Python: 3.10
Reedsolo: 1.5.4
OS: Linux / Slackware

Collecting reedsolo
  Using cached reedsolo-1.5.4.tar.gz (271 kB)
Building wheels for collected packages: reedsolo
  Building wheel for reedsolo (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-yfvlvd6u/reedsolo_8cc3b5cd27ba467ea55234248fb4edf0/setup.py'"'"'; __file__='"'"'/tmp/pip-install-yfvlvd6u/reedsolo_8cc3b5cd27ba467ea55234248fb4edf0/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-0hk94tmt
       cwd: /tmp/pip-install-yfvlvd6u/reedsolo_8cc3b5cd27ba467ea55234248fb4edf0/
  Complete output (161 lines):
  Cython is installed, building creedsolo module
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-i686-3.10
  copying reedsolo.py -> build/lib.linux-i686-3.10
  running build_ext
  building 'creedsolo' extension
  creating build/temp.linux-i686-3.10
  gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/include/python3.10 -c creedsolo.c -o build/temp.linux-i686-3.10/creedsolo.o
  creedsolo.c: In function ‘__pyx_tp_dealloc_array’:
  creedsolo.c:32027:5: error: lvalue required as increment operand
  32027 |     ++Py_REFCNT(o);
        |     ^~
  creedsolo.c:32029:5: error: lvalue required as decrement operand
  32029 |     --Py_REFCNT(o);
        |     ^~
  creedsolo.c: In function ‘__pyx_tp_dealloc_memoryview’:
  creedsolo.c:32338:5: error: lvalue required as increment operand
  32338 |     ++Py_REFCNT(o);
        |     ^~
  creedsolo.c:32340:5: error: lvalue required as decrement operand
  32340 |     --Py_REFCNT(o);
        |     ^~
  creedsolo.c: In function ‘__pyx_tp_dealloc__memoryviewslice’:
  creedsolo.c:32588:5: error: lvalue required as increment operand
  32588 |     ++Py_REFCNT(o);
        |     ^~
  creedsolo.c:32590:5: error: lvalue required as decrement operand
  32590 |     --Py_REFCNT(o);
        |     ^~
  creedsolo.c: In function ‘__Pyx_InitGlobals’:
  creedsolo.c:33787:1: warning: ‘PyEval_InitThreads’ is deprecated [-Wdeprecated-declarations]
  33787 | PyEval_InitThreads();
        | ^~~~~~~~~~~~~~~~~~
  In file included from /usr/include/python3.10/Python.h:144,
                   from creedsolo.c:16:
  /usr/include/python3.10/ceval.h:122:37: note: declared here
    122 | Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
        |                                     ^~~~~~~~~~~~~~~~~~
  creedsolo.c: In function ‘__Pyx_ParseOptionalKeywords’:
  creedsolo.c:35153:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
  35153 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
        |                     ^
  In file included from /usr/include/python3.10/unicodeobject.h:1046,
                   from /usr/include/python3.10/Python.h:96,
                   from creedsolo.c:16:
  /usr/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
    446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
        |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
  creedsolo.c:35153:21: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
  35153 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
        |                     ^
  In file included from /usr/include/python3.10/unicodeobject.h:1046,
                   from /usr/include/python3.10/Python.h:96,
                   from creedsolo.c:16:
  /usr/include/python3.10/cpython/unicodeobject.h:580:45: note: declared here
    580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
        |                                             ^~~~~~~~~~~~~~~~~~~
  creedsolo.c:35153:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
  35153 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
        |                     ^
  In file included from /usr/include/python3.10/unicodeobject.h:1046,
                   from /usr/include/python3.10/Python.h:96,
                   from creedsolo.c:16:
  /usr/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
    446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
        |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
  creedsolo.c:35153:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
  35153 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
        |                     ^
  In file included from /usr/include/python3.10/unicodeobject.h:1046,
                   from /usr/include/python3.10/Python.h:96,
                   from creedsolo.c:16:
  /usr/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
    446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
        |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
  creedsolo.c:35153:21: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
  35153 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
        |                     ^
  In file included from /usr/include/python3.10/unicodeobject.h:1046,
                   from /usr/include/python3.10/Python.h:96,
                   from creedsolo.c:16:
  /usr/include/python3.10/cpython/unicodeobject.h:580:45: note: declared here
    580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
        |                                             ^~~~~~~~~~~~~~~~~~~
  creedsolo.c:35153:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
  35153 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
        |                     ^
  In file included from /usr/include/python3.10/unicodeobject.h:1046,
                   from /usr/include/python3.10/Python.h:96,
                   from creedsolo.c:16:
  /usr/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
    446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
        |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
  creedsolo.c:35169:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
  35169 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
        |                         ^
  In file included from /usr/include/python3.10/unicodeobject.h:1046,
                   from /usr/include/python3.10/Python.h:96,
                   from creedsolo.c:16:
  /usr/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
    446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
        |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
  creedsolo.c:35169:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
  35169 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
        |                         ^
  In file included from /usr/include/python3.10/unicodeobject.h:1046,
                   from /usr/include/python3.10/Python.h:96,
                   from creedsolo.c:16:
  /usr/include/python3.10/cpython/unicodeobject.h:580:45: note: declared here
    580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
        |                                             ^~~~~~~~~~~~~~~~~~~
  creedsolo.c:35169:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
  35169 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
        |                         ^
  In file included from /usr/include/python3.10/unicodeobject.h:1046,
                   from /usr/include/python3.10/Python.h:96,
                   from creedsolo.c:16:
  /usr/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
    446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
        |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
  creedsolo.c:35169:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
  35169 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
        |                         ^
  In file included from /usr/include/python3.10/unicodeobject.h:1046,
                   from /usr/include/python3.10/Python.h:96,
                   from creedsolo.c:16:
  /usr/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
    446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
        |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
  creedsolo.c:35169:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
  35169 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
        |                         ^
  In file included from /usr/include/python3.10/unicodeobject.h:1046,
                   from /usr/include/python3.10/Python.h:96,
                   from creedsolo.c:16:
  /usr/include/python3.10/cpython/unicodeobject.h:580:45: note: declared here
    580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
        |                                             ^~~~~~~~~~~~~~~~~~~
  creedsolo.c:35169:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
  35169 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
        |                         ^
  In file included from /usr/include/python3.10/unicodeobject.h:1046,
                   from /usr/include/python3.10/Python.h:96,
                   from creedsolo.c:16:
  /usr/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
    446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
        |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
  creedsolo.c: In function ‘__Pyx_decode_c_string’:
  creedsolo.c:37955:9: warning: ‘PyUnicode_FromUnicode’ is deprecated [-Wdeprecated-declarations]
  37955 |         return PyUnicode_FromUnicode(NULL, 0);
        |         ^~~~~~
  In file included from /usr/include/python3.10/unicodeobject.h:1046,
                   from /usr/include/python3.10/Python.h:96,
                   from creedsolo.c:16:
  /usr/include/python3.10/cpython/unicodeobject.h:551:42: note: declared here
    551 | Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode(
        |                                          ^~~~~~~~~~~~~~~~~~~~~
  error: command '/usr/bin/gcc' failed with exit code 1
  ----------------------------------------
  ERROR: Failed building wheel for reedsolo

Thanks!

I am getting similar/the same issues as the migration in conda-forge for Python 3.10 started: conda-forge/reedsolo-feedstock#6

#38 works for me. Probably --native-compile option needs a fix as well.

Also having this problem. For anyone else, installing this prebuilt wheel works on python 3.10:
pip install https://dl.espressif.com/pypi/reedsolo/reedsolo-1.5.4-py3-none-any.whl
Would be great if #38 could get merged

This issue appears to affect only those who have Cython installed.

Should be fixed by v1.5.5 (will soon be pushed to PyPi).

See also #32.