From c7059cecd124e1e99ed6ad781b9eee41ed45c8e9 Mon Sep 17 00:00:00 2001 From: Hai Nguyen Date: Sun, 4 Feb 2024 16:41:15 +0700 Subject: [PATCH 1/5] chore: Support pandas 2 Signed-off-by: Hai Nguyen --- sdk/python/requirements/py3.10-ci-requirements.txt | 4 +++- sdk/python/requirements/py3.10-requirements.txt | 2 +- setup.py | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/sdk/python/requirements/py3.10-ci-requirements.txt b/sdk/python/requirements/py3.10-ci-requirements.txt index 34d0b0c2846..eeed8b1d8ab 100644 --- a/sdk/python/requirements/py3.10-ci-requirements.txt +++ b/sdk/python/requirements/py3.10-ci-requirements.txt @@ -529,7 +529,7 @@ packaging==23.2 # pytest # snowflake-connector-python # sphinx -pandas==1.5.3 +pandas==2.1.4 # via # altair # db-dtypes @@ -937,6 +937,8 @@ typing-extensions==4.9.0 # snowflake-connector-python # sqlalchemy2-stubs # uvicorn +tzdata==2023.4 + # via pandas tzlocal==5.2 # via # great-expectations diff --git a/sdk/python/requirements/py3.10-requirements.txt b/sdk/python/requirements/py3.10-requirements.txt index ba474f61205..67d06a02cce 100644 --- a/sdk/python/requirements/py3.10-requirements.txt +++ b/sdk/python/requirements/py3.10-requirements.txt @@ -121,7 +121,7 @@ packaging==23.2 # via # dask # gunicorn -pandas==1.5.3 +pandas==2.2.0 # via # feast (setup.py) # pandavro diff --git a/setup.py b/setup.py index a73ef31b061..cbcc717ecc8 100644 --- a/setup.py +++ b/setup.py @@ -54,7 +54,7 @@ "jsonschema", "mmh3", "numpy>=1.22,<1.25", - "pandas>=1.4.3,<2", + "pandas>=1.4.3,<3", # For some reason pandavro higher than 1.5.* only support pandas less than 1.3. "pandavro~=1.5.0", # Higher than 4.23.4 seems to cause a seg fault From 94036fd6139778cfd653bd1eb3b33e138f435147 Mon Sep 17 00:00:00 2001 From: Hai Nguyen Date: Sun, 4 Feb 2024 16:58:45 +0700 Subject: [PATCH 2/5] chore: Generate reqs for py38 and py39 Signed-off-by: Hai Nguyen --- sdk/python/requirements/py3.8-ci-requirements.txt | 4 +++- sdk/python/requirements/py3.8-requirements.txt | 2 +- sdk/python/requirements/py3.9-ci-requirements.txt | 4 +++- sdk/python/requirements/py3.9-requirements.txt | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/sdk/python/requirements/py3.8-ci-requirements.txt b/sdk/python/requirements/py3.8-ci-requirements.txt index bf8f4fbc425..81ddf5b96f1 100644 --- a/sdk/python/requirements/py3.8-ci-requirements.txt +++ b/sdk/python/requirements/py3.8-ci-requirements.txt @@ -546,7 +546,7 @@ packaging==23.2 # pytest # snowflake-connector-python # sphinx -pandas==1.5.3 +pandas==2.0.3 # via # altair # db-dtypes @@ -964,6 +964,8 @@ typing-extensions==4.9.0 # sqlalchemy2-stubs # starlette # uvicorn +tzdata==2023.4 + # via pandas tzlocal==5.2 # via # great-expectations diff --git a/sdk/python/requirements/py3.8-requirements.txt b/sdk/python/requirements/py3.8-requirements.txt index 5e8481e7706..8214bdacc5f 100644 --- a/sdk/python/requirements/py3.8-requirements.txt +++ b/sdk/python/requirements/py3.8-requirements.txt @@ -124,7 +124,7 @@ packaging==23.2 # via # dask # gunicorn -pandas==1.5.3 +pandas==2.0.3 # via # feast (setup.py) # pandavro diff --git a/sdk/python/requirements/py3.9-ci-requirements.txt b/sdk/python/requirements/py3.9-ci-requirements.txt index 670ba1c07d6..4f2ba2e9d07 100644 --- a/sdk/python/requirements/py3.9-ci-requirements.txt +++ b/sdk/python/requirements/py3.9-ci-requirements.txt @@ -536,7 +536,7 @@ packaging==23.2 # pytest # snowflake-connector-python # sphinx -pandas==1.5.3 +pandas==2.1.4 # via # altair # db-dtypes @@ -949,6 +949,8 @@ typing-extensions==4.9.0 # sqlalchemy2-stubs # starlette # uvicorn +tzdata==2023.4 + # via pandas tzlocal==5.2 # via # great-expectations diff --git a/sdk/python/requirements/py3.9-requirements.txt b/sdk/python/requirements/py3.9-requirements.txt index 2815ed0d787..93ff3427be3 100644 --- a/sdk/python/requirements/py3.9-requirements.txt +++ b/sdk/python/requirements/py3.9-requirements.txt @@ -121,7 +121,7 @@ packaging==23.2 # via # dask # gunicorn -pandas==1.5.3 +pandas==2.2.0 # via # feast (setup.py) # pandavro From 3a5011bb10594f3200aa135360f62e9635bb8567 Mon Sep 17 00:00:00 2001 From: Hai Nguyen Date: Sun, 4 Feb 2024 19:18:26 +0700 Subject: [PATCH 3/5] fix: Update imports in mysql unit test Signed-off-by: Hai Nguyen --- .../tests/unit/infra/online_store/test_dynamodb_online_store.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/python/tests/unit/infra/online_store/test_dynamodb_online_store.py b/sdk/python/tests/unit/infra/online_store/test_dynamodb_online_store.py index 6045dbc6ce0..5844bb2e32a 100644 --- a/sdk/python/tests/unit/infra/online_store/test_dynamodb_online_store.py +++ b/sdk/python/tests/unit/infra/online_store/test_dynamodb_online_store.py @@ -3,7 +3,7 @@ import boto3 import pytest -from moto import mock_dynamodb +from moto import mock_dynamodb2 as mock_dynamodb from feast.infra.offline_stores.file import FileOfflineStoreConfig from feast.infra.online_stores.dynamodb import ( From 83b1160617c06ad733a8d14176f622fe47833223 Mon Sep 17 00:00:00 2001 From: Hai Nguyen Date: Sun, 4 Feb 2024 19:34:06 +0700 Subject: [PATCH 4/5] fix: Set upper bound for moto Signed-off-by: Hai Nguyen --- .../tests/unit/infra/online_store/test_dynamodb_online_store.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/python/tests/unit/infra/online_store/test_dynamodb_online_store.py b/sdk/python/tests/unit/infra/online_store/test_dynamodb_online_store.py index 5844bb2e32a..6045dbc6ce0 100644 --- a/sdk/python/tests/unit/infra/online_store/test_dynamodb_online_store.py +++ b/sdk/python/tests/unit/infra/online_store/test_dynamodb_online_store.py @@ -3,7 +3,7 @@ import boto3 import pytest -from moto import mock_dynamodb2 as mock_dynamodb +from moto import mock_dynamodb from feast.infra.offline_stores.file import FileOfflineStoreConfig from feast.infra.online_stores.dynamodb import ( From 09bdff68430ff5e9bc03e15a205585d0a0974c9f Mon Sep 17 00:00:00 2001 From: Hai Nguyen Date: Sun, 4 Feb 2024 20:31:58 +0700 Subject: [PATCH 5/5] fix: Recompile ci deps py38 py39 Signed-off-by: Hai Nguyen --- sdk/python/requirements/py3.8-ci-requirements.txt | 4 +--- sdk/python/requirements/py3.8-requirements.txt | 2 +- setup.py | 4 +++- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sdk/python/requirements/py3.8-ci-requirements.txt b/sdk/python/requirements/py3.8-ci-requirements.txt index 81ddf5b96f1..bf8f4fbc425 100644 --- a/sdk/python/requirements/py3.8-ci-requirements.txt +++ b/sdk/python/requirements/py3.8-ci-requirements.txt @@ -546,7 +546,7 @@ packaging==23.2 # pytest # snowflake-connector-python # sphinx -pandas==2.0.3 +pandas==1.5.3 # via # altair # db-dtypes @@ -964,8 +964,6 @@ typing-extensions==4.9.0 # sqlalchemy2-stubs # starlette # uvicorn -tzdata==2023.4 - # via pandas tzlocal==5.2 # via # great-expectations diff --git a/sdk/python/requirements/py3.8-requirements.txt b/sdk/python/requirements/py3.8-requirements.txt index 8214bdacc5f..5e8481e7706 100644 --- a/sdk/python/requirements/py3.8-requirements.txt +++ b/sdk/python/requirements/py3.8-requirements.txt @@ -124,7 +124,7 @@ packaging==23.2 # via # dask # gunicorn -pandas==2.0.3 +pandas==1.5.3 # via # feast (setup.py) # pandavro diff --git a/setup.py b/setup.py index cbcc717ecc8..9cb9ac0fbb9 100644 --- a/setup.py +++ b/setup.py @@ -54,7 +54,9 @@ "jsonschema", "mmh3", "numpy>=1.22,<1.25", - "pandas>=1.4.3,<3", + # only accept pandas versions 2.2.0 and above + # for python 3.8, it must be less than 2.0.0 + "pandas>=1.4.3,<3,!=2.0.*,!=2.1.*", # For some reason pandavro higher than 1.5.* only support pandas less than 1.3. "pandavro~=1.5.0", # Higher than 4.23.4 seems to cause a seg fault