From 7a4df3d76f5361e8d3404e7b56cc9b8ad3281992 Mon Sep 17 00:00:00 2001 From: Haonan Date: Wed, 26 Jun 2024 15:31:49 +0800 Subject: [PATCH] Allow using python 3.6 and enable CI (#12792) * Enable python 3.6 CI * Enable python 3.6 CI * Enable python 3.6 CI * Enable python 3.6 CI * try Enable python 3.6 CI * try Enable python 3.6 CI * Fix python CI * Fix python CI * Fix python CI * Fix python CI * Fix python CI * Fix python CI * allow python 3.6 --- iotdb-client/client-py/iotdb/utils/IoTDBRpcDataSet.py | 2 +- iotdb-client/client-py/requirements.txt | 4 ++-- iotdb-client/client-py/requirements_dev.txt | 8 ++++---- iotdb-client/client-py/resources/setup.py | 6 +++--- iotdb-client/client-py/tests/test_todf.py | 6 +++--- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/iotdb-client/client-py/iotdb/utils/IoTDBRpcDataSet.py b/iotdb-client/client-py/iotdb/utils/IoTDBRpcDataSet.py index eb859d7d30c1d..3151b2acfd8c5 100644 --- a/iotdb-client/client-py/iotdb/utils/IoTDBRpcDataSet.py +++ b/iotdb-client/client-py/iotdb/utils/IoTDBRpcDataSet.py @@ -361,7 +361,7 @@ def resultset_to_pandas(self): result[k] = pd.Series(np.concatenate(v, axis=0)).astype("Int32") elif v[0].dtype == "Int64": result[k] = pd.Series(np.concatenate(v, axis=0)).astype("Int64") - elif v[0].dtype == "boolean": + elif v[0].dtype == bool: result[k] = pd.Series(np.concatenate(v, axis=0)).astype("boolean") else: result[k] = np.concatenate(v, axis=0) diff --git a/iotdb-client/client-py/requirements.txt b/iotdb-client/client-py/requirements.txt index 23c97837a7987..490393d157ce2 100644 --- a/iotdb-client/client-py/requirements.txt +++ b/iotdb-client/client-py/requirements.txt @@ -17,8 +17,8 @@ # # Pandas Export -pandas>=1.3.5 -numpy>=1.21.4 +pandas>=1.0.0 +numpy>=1.0.0 thrift>=0.14.1 # SQLAlchemy Dialect sqlalchemy<1.5,>=1.4 diff --git a/iotdb-client/client-py/requirements_dev.txt b/iotdb-client/client-py/requirements_dev.txt index 38fe8ccd816cf..53b73454f902c 100644 --- a/iotdb-client/client-py/requirements_dev.txt +++ b/iotdb-client/client-py/requirements_dev.txt @@ -18,11 +18,11 @@ -r requirements.txt # Pytest to run tests -pytest==7.2.0 -flake8==3.9.0 -black==24.3.0 +pytest>=7.0.0 +flake8>=5.0.0 +black>=22.8.0 # Testcontainer testcontainers==3.4.2 # For releases twine==3.4.1 -wheel==0.38.1 \ No newline at end of file +wheel>=0.37.1 diff --git a/iotdb-client/client-py/resources/setup.py b/iotdb-client/client-py/resources/setup.py index acf5857327aec..202507af8045b 100644 --- a/iotdb-client/client-py/resources/setup.py +++ b/iotdb-client/client-py/resources/setup.py @@ -41,8 +41,8 @@ packages=setuptools.find_packages(), install_requires=[ "thrift>=0.14.1", - "pandas>=1.3.5", - "numpy>=1.21.4", + "pandas>=1.0.0", + "numpy>=1.0.0", "sqlalchemy<1.5,>=1.4", "sqlalchemy-utils>=0.37.8", ], @@ -53,7 +53,7 @@ "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Python Modules", ], - python_requires=">=3.7", + python_requires=">=3.6", license="Apache License, Version 2.0", website="https://iotdb.apache.org", entry_points={ diff --git a/iotdb-client/client-py/tests/test_todf.py b/iotdb-client/client-py/tests/test_todf.py index 6fce1cd18d719..03e97974776a7 100644 --- a/iotdb-client/client-py/tests/test_todf.py +++ b/iotdb-client/client-py/tests/test_todf.py @@ -98,7 +98,7 @@ def test_simple_query(): df_output = df_output[df_input.columns.tolist()] session.close() - assert_frame_equal(df_input, df_output) + assert_frame_equal(df_input, df_output, check_dtype=False) def test_with_null_query(): @@ -178,7 +178,7 @@ def test_with_null_query(): df_output = df_output[df_input.columns.tolist()] session.close() - assert_frame_equal(df_input, df_output) + assert_frame_equal(df_input, df_output, check_dtype=False) def test_multi_fetch(): @@ -216,4 +216,4 @@ def test_multi_fetch(): df_output = df_output[df_input.columns.tolist()] session.close() - assert_frame_equal(df_input, df_output) + assert_frame_equal(df_input, df_output, check_dtype=False)