diff --git a/CHANGELOG.md b/CHANGELOG.md index 3de67cc5..f70460ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ## [Unreleased] ### Added ### Changed +- Removed deprecated `numpy.float_` and update NumPy/Pandas imports ([#762](https://github.com/opensearch-project/opensearch-py/pull/762)) ### Deprecated ### Removed ### Fixed diff --git a/dev-requirements.txt b/dev-requirements.txt index 580ed7ee..979bc04a 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -11,9 +11,8 @@ deepmerge Events setuptools -# No wheels for Python 3.10 yet! -numpy; python_version<"3.10" -pandas; python_version<"3.10" +numpy; python_version<="3.12" +pandas; python_version<="3.12" pyyaml>=5.4 diff --git a/opensearchpy/serializer.py b/opensearchpy/serializer.py index e5c0a6c9..d16c287e 100644 --- a/opensearchpy/serializer.py +++ b/opensearchpy/serializer.py @@ -111,7 +111,6 @@ def default(self, data: Any) -> Any: elif isinstance( data, ( - np.float_, np.float16, np.float32, np.float64, diff --git a/test_opensearchpy/test_serializer.py b/test_opensearchpy/test_serializer.py index 524887d0..c0f223ad 100644 --- a/test_opensearchpy/test_serializer.py +++ b/test_opensearchpy/test_serializer.py @@ -106,7 +106,6 @@ def test_serializes_numpy_floats(self) -> None: ser = JSONSerializer() for np_type in ( - np.float_, np.float32, np.float64, ):