Open yurivict opened 2 hours ago
Dangit, looks like 0.5.0 didn't include the .pxi if you want to use your own cython to make the C file.
I made this patch 327a8ffa765b1d2e3bd5d604a0f8df4a0567717b and released 0.5.1, can you try again?
0.5.1 fails like this:
In file included from talib/_ta_lib.c:1235:
In file included from /usr/local/lib/python3.11/site-packages/numpy/core/include/numpy/arrayobject.h:5:
In file included from /usr/local/lib/python3.11/site-packages/numpy/core/include/numpy/ndarrayobject.h:12:
In file included from /usr/local/lib/python3.11/site-packages/numpy/core/include/numpy/ndarraytypes.h:1929:
/usr/local/lib/python3.11/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
17 | #warning "Using deprecated NumPy API, disable it with " \
| ^
talib/_ta_lib.c:10083:13: warning: call to undeclared function 'PyDataType_ELSIZE'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
10083 | __pyx_r = PyDataType_ELSIZE(__pyx_v_self);
| ^
talib/_ta_lib.c:10096:13: warning: call to undeclared function 'PyDataType_ALIGNMENT'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
10096 | __pyx_r = PyDataType_ALIGNMENT(__pyx_v_self);
| ^
talib/_ta_lib.c:10113:15: warning: call to undeclared function 'PyDataType_FIELDS'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
10113 | __pyx_t_1 = PyDataType_FIELDS(__pyx_v_self);
| ^
talib/_ta_lib.c:10113:13: error: incompatible integer to pointer conversion assigning to 'PyObject *' (aka 'struct _object *') from 'int' [-Wint-conversion]
10113 | __pyx_t_1 = PyDataType_FIELDS(__pyx_v_self);
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
talib/_ta_lib.c:10134:15: warning: call to undeclared function 'PyDataType_NAMES'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
10134 | __pyx_t_1 = PyDataType_NAMES(__pyx_v_self);
| ^
py311-cython3-3.0.11 is used.
Is that a failure? Looks like a warning.
If you are using numpy 2, then the 0.5 release is for you. (latest 0.5.1)
If you are using numpy 1, then the 0.4 release is for you. (latest 0.4.34)
error: incompatible integer to pointer conversion assigning to 'PyObject *'
I think PyDataType_ELSIZE
is part of the numpy 2 ?
https://numpy.org/devdocs/numpy_2_0_migration_guide.html#migration-c-descr
#if NPY_ABI_VERSION < 0x02000000
#define PyDataType_ELSIZE(descr) ((descr)->elsize)
#endif
You probably want the ta-lib<=0.5
releases.
py311-numpy-1.26.4_2 is used.
Perhaps we shouldn't upgrade the port until numpy-2 is available.
I was resisting upgrading to numpy2 because we use cython to generate the C files and there didn't seem a clean way to make them work for both numpy1 and numpy2, so the approach someone recommended was to have an 0.4 series that supports numpy1 and and 0.5 series that supports numpy2.
I couldn't get the npy_2_compat.h
approach to work cleanly...
Version: 0.5.0 Python-3.11