From 4b572591e00c13058fcee76d4f075cc3e281824c Mon Sep 17 00:00:00 2001 From: dsmit-vortexa Date: Thu, 19 Sep 2024 12:08:46 +0100 Subject: [PATCH 1/2] dev: upgrade to pandas 2 --- requirements.txt | 2 +- tests/test_core.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index c57725b..6a829db 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,7 +6,7 @@ confluent-kafka~=2.4.0 logzero>=1.7.0 magic-logger>=1.0.2 no_implicit_optional==1.4.0 -pandas>=1.2.4 +pandas>=2.0.0 psycopg2-binary~=2.9.3 pyarrow>=7.0.0 pydantic>=1.9.2,<3 diff --git a/tests/test_core.py b/tests/test_core.py index fecc5a4..088d9f8 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -465,7 +465,7 @@ def test_schema_metrics_are_not_logged_on_write_if_metrics_flag_is_false(self, m CASTING_WARNING_MSG.format("bool_col", "bool", "object"), ), ( - pd.DataFrame.from_records([{"id": 1, "foo_name": "A", "bar": 12, "bool_col": True}, {"id": 2, "foo_name": "B", "bar": 12, "bool_col": np.NAN}]), + pd.DataFrame.from_records([{"id": 1, "foo_name": "A", "bar": 12, "bool_col": True}, {"id": 2, "foo_name": "B", "bar": 12, "bool_col": np.nan}]), "bool", CASTING_WARNING_MSG.format("bool_col", "bool", "object"), ), From 534b973c555d608b3bd6b9e938da024499b302ff Mon Sep 17 00:00:00 2001 From: dsmit-vortexa Date: Thu, 19 Sep 2024 14:11:21 +0100 Subject: [PATCH 2/2] dev: pin numpy version --- requirements.txt | 1 + tests/test_core.py | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index 6a829db..f96dbbf 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,6 +6,7 @@ confluent-kafka~=2.4.0 logzero>=1.7.0 magic-logger>=1.0.2 no_implicit_optional==1.4.0 +numpy<2.0.0 pandas>=2.0.0 psycopg2-binary~=2.9.3 pyarrow>=7.0.0 diff --git a/tests/test_core.py b/tests/test_core.py index 088d9f8..c52e52b 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -516,7 +516,7 @@ def test__has_valid_dtypes_does_not_attempt_to_convert_object_type_to_other_type CASTING_WARNING_MSG.format("bool_col", "bool", "object"), ), ( - pd.DataFrame.from_records([{"id": 1, "foo_name": "A", "bar": 12, "bool_col": True}, {"id": 2, "foo_name": "B", "bar": 12, "bool_col": np.NAN}]), + pd.DataFrame.from_records([{"id": 1, "foo_name": "A", "bar": 12, "bool_col": True}, {"id": 2, "foo_name": "B", "bar": 12, "bool_col": np.nan}]), "bool", CASTING_WARNING_MSG.format("bool_col", "bool", "object"), ), @@ -578,7 +578,7 @@ def test__has_valid_dtypes_does_not_attempt_to_convert_object_type_to_other_type CASTING_WARNING_MSG.format("bool_col", "bool", "object"), ), ( - pd.DataFrame.from_records([{"id": 1, "foo_name": "A", "bar": 12, "bool_col": True}, {"id": 2, "foo_name": "B", "bar": 12, "bool_col": np.NAN}]), + pd.DataFrame.from_records([{"id": 1, "foo_name": "A", "bar": 12, "bool_col": True}, {"id": 2, "foo_name": "B", "bar": 12, "bool_col": np.nan}]), "bool", CASTING_WARNING_MSG.format("bool_col", "bool", "object"), ), @@ -640,7 +640,7 @@ def test__has_valid_dtypes_does_not_attempt_to_convert_object_type_to_other_type CASTING_WARNING_MSG.format("bool_col", "bool", "object"), ), ( - pd.DataFrame.from_records([{"id": 1, "foo_name": "A", "bar": 12, "bool_col": True}, {"id": 2, "foo_name": "B", "bar": 12, "bool_col": np.NAN}]), + pd.DataFrame.from_records([{"id": 1, "foo_name": "A", "bar": 12, "bool_col": True}, {"id": 2, "foo_name": "B", "bar": 12, "bool_col": np.nan}]), "bool", CASTING_WARNING_MSG.format("bool_col", "bool", "object"), ),