From 0322a339dc612fbcd99dd1c1a8458474e7037197 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Wed, 1 Jan 2025 14:47:57 -0800 Subject: [PATCH 1/7] version bump 0.5.3 --- CHANGELOG | 5 +++++ pyproject.toml | 2 +- setup.py | 4 ++-- talib/__init__.py | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index ebf70ee55..25b8ca793 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -3,6 +3,11 @@ - [FIX]: Make sure this wrapper works with TA-Lib 0.6.1 and newer releases. +0.5.3 +===== + +- [BUG]: Make this release only support TA-Lib 0.4.0. + 0.5.2 ===== diff --git a/pyproject.toml b/pyproject.toml index 7a3bf8472..7404f80cb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "ta-lib" -version = "0.6.0" +version = "0.5.3" dynamic = ["authors", "classifiers", "description", "license", "readme"] dependencies = [ "setuptools", diff --git a/setup.py b/setup.py index 7b4a9df7b..a9a4b217a 100644 --- a/setup.py +++ b/setup.py @@ -62,7 +62,7 @@ except ImportError: has_cython = False -lib_talib_name = 'ta-lib' # the name as of TA-Lib 0.6.1 +lib_talib_name = 'ta_lib' # the name as of TA-Lib 0.4.0 for path in library_dirs: try: @@ -143,7 +143,7 @@ def build_extensions(self): setup( name='TA-Lib', - version='0.6.0', + version='0.5.3', description='Python wrapper for TA-Lib', long_description=long_description, long_description_content_type='text/markdown', diff --git a/talib/__init__.py b/talib/__init__.py index 56d9c7d39..f91f5fe7f 100644 --- a/talib/__init__.py +++ b/talib/__init__.py @@ -132,7 +132,7 @@ def wrapper(*args, **kwds): setattr(stream, func_name, wrapped_func) globals()[stream_func_name] = wrapped_func -__version__ = '0.6.0' +__version__ = '0.5.3' # In order to use this python library, talib (i.e. this __file__) will be # imported at some point, either explicitly or indirectly via talib.func From f29b2520fabc0a9d6c7e1cd6b0fca00ac7b0b665 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Wed, 1 Jan 2025 14:57:20 -0800 Subject: [PATCH 2/7] .github: test on this branch --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0f10607f8..1fbaac578 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -2,9 +2,9 @@ name: Tests on: push: - branches: [ master ] + branches: [ 0.5 ] pull_request: - branches: [ master ] + branches: [ 0.5 ] jobs: build: From 3a31db201c5dd87388051454d5b5a58f35fc54ab Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Fri, 7 Feb 2025 15:27:24 -0800 Subject: [PATCH 3/7] fix lib name on windows --- CHANGELOG | 20 ++++++++++++++++++++ pyproject.toml | 2 +- setup.py | 6 +++--- talib/__init__.py | 2 +- 4 files changed, 25 insertions(+), 5 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 25b8ca793..cba3432dc 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -3,6 +3,11 @@ - [FIX]: Make sure this wrapper works with TA-Lib 0.6.1 and newer releases. +0.5.4 +===== + +- [FIX]: Fix lib name on windows. + 0.5.3 ===== @@ -25,6 +30,21 @@ - [NEW]: Upgrade to Numpy 2.0 +0.4.38 +====== + +- [FIX]: Fix lib name on windows. + +0.4.37 +====== + +- [FIX]: Make sure to pin numpy<2 in the setup.py. + +0.4.36 +====== + +- [BUG]: Make this release only support TA-Lib 0.4.0 + 0.4.35 ====== diff --git a/pyproject.toml b/pyproject.toml index 7404f80cb..543746611 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "ta-lib" -version = "0.5.3" +version = "0.5.4" dynamic = ["authors", "classifiers", "description", "license", "readme"] dependencies = [ "setuptools", diff --git a/setup.py b/setup.py index a9a4b217a..4a73f8398 100644 --- a/setup.py +++ b/setup.py @@ -20,6 +20,8 @@ platform_supported = False +lib_talib_name = 'ta_lib' # the name as of TA-Lib 0.4.0 + if any(s in sys.platform for s in ['darwin', 'linux', 'bsd', 'sunos']): platform_supported = True include_dirs = [ @@ -62,8 +64,6 @@ except ImportError: has_cython = False -lib_talib_name = 'ta_lib' # the name as of TA-Lib 0.4.0 - for path in library_dirs: try: files = os.listdir(path) @@ -143,7 +143,7 @@ def build_extensions(self): setup( name='TA-Lib', - version='0.5.3', + version='0.5.4', description='Python wrapper for TA-Lib', long_description=long_description, long_description_content_type='text/markdown', diff --git a/talib/__init__.py b/talib/__init__.py index f91f5fe7f..9945219fd 100644 --- a/talib/__init__.py +++ b/talib/__init__.py @@ -132,7 +132,7 @@ def wrapper(*args, **kwds): setattr(stream, func_name, wrapped_func) globals()[stream_func_name] = wrapped_func -__version__ = '0.5.3' +__version__ = '0.5.4' # In order to use this python library, talib (i.e. this __file__) will be # imported at some point, either explicitly or indirectly via talib.func From 80acad23153d8b9672b88a6d9c6447c93e26122d Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Fri, 7 Feb 2025 15:35:29 -0800 Subject: [PATCH 4/7] remove python 3.7 --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1fbaac578..338049105 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] steps: - uses: actions/checkout@v3 From 6fa8bc69136263dff87d2491792918bdbf0de54d Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Sun, 8 Jun 2025 08:16:04 -0700 Subject: [PATCH 5/7] version bump 0.5.5 --- pyproject.toml | 2 +- setup.py | 2 +- talib/__init__.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 543746611..16d5a2611 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "ta-lib" -version = "0.5.4" +version = "0.5.5" dynamic = ["authors", "classifiers", "description", "license", "readme"] dependencies = [ "setuptools", diff --git a/setup.py b/setup.py index 4a73f8398..1640f3096 100644 --- a/setup.py +++ b/setup.py @@ -143,7 +143,7 @@ def build_extensions(self): setup( name='TA-Lib', - version='0.5.4', + version='0.5.5', description='Python wrapper for TA-Lib', long_description=long_description, long_description_content_type='text/markdown', diff --git a/talib/__init__.py b/talib/__init__.py index 9945219fd..32ac60179 100644 --- a/talib/__init__.py +++ b/talib/__init__.py @@ -132,7 +132,7 @@ def wrapper(*args, **kwds): setattr(stream, func_name, wrapped_func) globals()[stream_func_name] = wrapped_func -__version__ = '0.5.4' +__version__ = '0.5.5' # In order to use this python library, talib (i.e. this __file__) will be # imported at some point, either explicitly or indirectly via talib.func From 11d131b7102dddcf54fb81be80ef316d461eb32b Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Sun, 8 Jun 2025 08:16:29 -0700 Subject: [PATCH 6/7] Update for numpy 2.3.0 --- CHANGELOG | 5 +++++ talib/_func.pxi | 6 +++--- talib/_ta_lib.c | 6 +++--- tools/generate_func.py | 6 +++--- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index cba3432dc..9b217e46a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -3,6 +3,11 @@ - [FIX]: Make sure this wrapper works with TA-Lib 0.6.1 and newer releases. +0.5.5 +===== + +- [FIX]: Fix for numpy 2.3.0, which removed the npy_1_7_deprecated_api + 0.5.4 ===== diff --git a/talib/_func.pxi b/talib/_func.pxi index 5d60d7dd3..aebfabce3 100644 --- a/talib/_func.pxi +++ b/talib/_func.pxi @@ -22,7 +22,7 @@ cdef np.ndarray check_array(np.ndarray real): raise Exception("input array type is not double") if real.ndim != 1: raise Exception("input array has wrong dimensions") - if not (PyArray_FLAGS(real) & np.NPY_C_CONTIGUOUS): + if not (PyArray_FLAGS(real) & np.NPY_ARRAY_C_CONTIGUOUS): real = PyArray_GETCONTIGUOUS(real) return real @@ -122,7 +122,7 @@ cdef np.ndarray make_double_array(np.npy_intp length, int lookback): cdef: np.ndarray outreal double* outreal_data - outreal = PyArray_EMPTY(1, &length, np.NPY_DOUBLE, np.NPY_DEFAULT) + outreal = PyArray_EMPTY(1, &length, np.NPY_DOUBLE, np.NPY_ARRAY_DEFAULT) outreal_data = outreal.data for i from 0 <= i < min(lookback, length): outreal_data[i] = NaN @@ -132,7 +132,7 @@ cdef np.ndarray make_int_array(np.npy_intp length, int lookback): cdef: np.ndarray outinteger int* outinteger_data - outinteger = PyArray_EMPTY(1, &length, np.NPY_INT32, np.NPY_DEFAULT) + outinteger = PyArray_EMPTY(1, &length, np.NPY_INT32, np.NPY_ARRAY_DEFAULT) outinteger_data = outinteger.data for i from 0 <= i < min(lookback, length): outinteger_data[i] = 0 diff --git a/talib/_ta_lib.c b/talib/_ta_lib.c index e45816832..e80810f21 100644 --- a/talib/_ta_lib.c +++ b/talib/_ta_lib.c @@ -12451,7 +12451,7 @@ static PyArrayObject *__pyx_f_5talib_7_ta_lib_check_array(PyArrayObject *__pyx_v } - __pyx_t_1 = (!((PyArray_FLAGS(__pyx_v_real) & NPY_C_CONTIGUOUS) != 0)); + __pyx_t_1 = (!((PyArray_FLAGS(__pyx_v_real) & NPY_ARRAY_C_CONTIGUOUS) != 0)); if (__pyx_t_1) { __pyx_t_2 = ((PyObject *)PyArray_GETCONTIGUOUS(__pyx_v_real)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 26, __pyx_L1_error) @@ -12844,7 +12844,7 @@ static PyArrayObject *__pyx_f_5talib_7_ta_lib_make_double_array(npy_intp __pyx_v int __pyx_clineno = 0; __Pyx_RefNannySetupContext("make_double_array", 1); - __pyx_t_1 = ((PyObject *)PyArray_EMPTY(1, (&__pyx_v_length), NPY_DOUBLE, NPY_DEFAULT)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 125, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)PyArray_EMPTY(1, (&__pyx_v_length), NPY_DOUBLE, NPY_ARRAY_DEFAULT)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_outreal = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; @@ -12900,7 +12900,7 @@ static PyArrayObject *__pyx_f_5talib_7_ta_lib_make_int_array(npy_intp __pyx_v_le int __pyx_clineno = 0; __Pyx_RefNannySetupContext("make_int_array", 1); - __pyx_t_1 = ((PyObject *)PyArray_EMPTY(1, (&__pyx_v_length), NPY_INT32, NPY_DEFAULT)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 135, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)PyArray_EMPTY(1, (&__pyx_v_length), NPY_INT32, NPY_ARRAY_DEFAULT)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 135, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_outinteger = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; diff --git a/tools/generate_func.py b/tools/generate_func.py index 5a625ef08..ae36afc8e 100644 --- a/tools/generate_func.py +++ b/tools/generate_func.py @@ -73,7 +73,7 @@ raise Exception("input array type is not double") if real.ndim != 1: raise Exception("input array has wrong dimensions") - if not (PyArray_FLAGS(real) & np.NPY_C_CONTIGUOUS): + if not (PyArray_FLAGS(real) & np.NPY_ARRAY_C_CONTIGUOUS): real = PyArray_GETCONTIGUOUS(real) return real @@ -173,7 +173,7 @@ cdef: np.ndarray outreal double* outreal_data - outreal = PyArray_EMPTY(1, &length, np.NPY_DOUBLE, np.NPY_DEFAULT) + outreal = PyArray_EMPTY(1, &length, np.NPY_DOUBLE, np.NPY_ARRAY_DEFAULT) outreal_data = outreal.data for i from 0 <= i < min(lookback, length): outreal_data[i] = NaN @@ -183,7 +183,7 @@ cdef: np.ndarray outinteger int* outinteger_data - outinteger = PyArray_EMPTY(1, &length, np.NPY_INT32, np.NPY_DEFAULT) + outinteger = PyArray_EMPTY(1, &length, np.NPY_INT32, np.NPY_ARRAY_DEFAULT) outinteger_data = outinteger.data for i from 0 <= i < min(lookback, length): outinteger_data[i] = 0 From b1f3f90e4f7c03433caceac38f9a4774552bdbfa Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Sun, 8 Jun 2025 08:21:09 -0700 Subject: [PATCH 7/7] remove global include_dirs --- setup.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setup.py b/setup.py index 1640f3096..265825f2a 100644 --- a/setup.py +++ b/setup.py @@ -91,7 +91,6 @@ def __setitem__(self, key, value): super(LazyBuildExtCommandClass, self).__setitem__(key, value) def __getitem__(self, key): - global include_dirs if key != 'build_ext': return super(LazyBuildExtCommandClass, self).__getitem__(key)