From f21dd70ae81f352bbab545c2063f101d003ef083 Mon Sep 17 00:00:00 2001 From: Tyler Rhodes <767526+trhodeos@users.noreply.github.com> Date: Mon, 5 Feb 2024 11:43:23 -0600 Subject: [PATCH] Update typeguard version to >=4 Signed-off-by: Tyler Rhodes <767526+trhodeos@users.noreply.github.com> --- sdk/python/feast/feature_service.py | 2 +- sdk/python/feast/feature_view.py | 2 +- sdk/python/requirements/py3.10-ci-requirements.txt | 2 +- sdk/python/requirements/py3.10-requirements.txt | 3 ++- sdk/python/requirements/py3.8-ci-requirements.txt | 2 +- sdk/python/requirements/py3.8-requirements.txt | 2 +- sdk/python/requirements/py3.9-ci-requirements.txt | 2 +- sdk/python/requirements/py3.9-requirements.txt | 2 +- sdk/python/tests/unit/test_feature_views.py | 3 ++- setup.py | 2 +- 10 files changed, 12 insertions(+), 10 deletions(-) diff --git a/sdk/python/feast/feature_service.py b/sdk/python/feast/feature_service.py index c3037a55da2..7ec923205a3 100644 --- a/sdk/python/feast/feature_service.py +++ b/sdk/python/feast/feature_service.py @@ -56,7 +56,7 @@ def __init__( *, name: str, features: List[Union[FeatureView, OnDemandFeatureView]], - tags: Dict[str, str] = None, + tags: Optional[Dict[str, str]] = None, description: str = "", owner: str = "", logging_config: Optional[LoggingConfig] = None, diff --git a/sdk/python/feast/feature_view.py b/sdk/python/feast/feature_view.py index 67f9662d317..f87ae7ab132 100644 --- a/sdk/python/feast/feature_view.py +++ b/sdk/python/feast/feature_view.py @@ -101,7 +101,7 @@ def __init__( name: str, source: DataSource, schema: Optional[List[Field]] = None, - entities: List[Entity] = None, + entities: Optional[List[Entity]] = None, ttl: Optional[timedelta] = timedelta(days=0), online: bool = True, description: str = "", diff --git a/sdk/python/requirements/py3.10-ci-requirements.txt b/sdk/python/requirements/py3.10-ci-requirements.txt index 094418cda6b..c7dcb7b91e3 100644 --- a/sdk/python/requirements/py3.10-ci-requirements.txt +++ b/sdk/python/requirements/py3.10-ci-requirements.txt @@ -902,7 +902,7 @@ traitlets==5.13.0 # nbformat trino==0.327.0 # via feast (setup.py) -typeguard==2.13.3 +typeguard==4.1.5 # via feast (setup.py) types-protobuf==3.19.22 # via diff --git a/sdk/python/requirements/py3.10-requirements.txt b/sdk/python/requirements/py3.10-requirements.txt index 18486d7fa9a..cb5f1c59327 100644 --- a/sdk/python/requirements/py3.10-requirements.txt +++ b/sdk/python/requirements/py3.10-requirements.txt @@ -196,7 +196,8 @@ toolz==0.12.0 # partd tqdm==4.66.1 # via feast (setup.py) -typeguard==2.13.3 +typeguard==4.1.5 + # via feast (setup.py) # via feast (setup.py) types-protobuf==4.24.0.4 # via mypy-protobuf diff --git a/sdk/python/requirements/py3.8-ci-requirements.txt b/sdk/python/requirements/py3.8-ci-requirements.txt index c477c208355..64b2904a06a 100644 --- a/sdk/python/requirements/py3.8-ci-requirements.txt +++ b/sdk/python/requirements/py3.8-ci-requirements.txt @@ -919,7 +919,7 @@ traitlets==5.13.0 # nbformat trino==0.327.0 # via feast (setup.py) -typeguard==2.13.3 +typeguard==4.1.5 # via feast (setup.py) types-protobuf==3.19.22 # via diff --git a/sdk/python/requirements/py3.8-requirements.txt b/sdk/python/requirements/py3.8-requirements.txt index c180c50c81e..542c5e3d121 100644 --- a/sdk/python/requirements/py3.8-requirements.txt +++ b/sdk/python/requirements/py3.8-requirements.txt @@ -201,7 +201,7 @@ toolz==0.12.0 # partd tqdm==4.66.1 # via feast (setup.py) -typeguard==2.13.3 +typeguard==4.1.5 # via feast (setup.py) types-protobuf==4.24.0.4 # via mypy-protobuf diff --git a/sdk/python/requirements/py3.9-ci-requirements.txt b/sdk/python/requirements/py3.9-ci-requirements.txt index 6f400fe2408..a973053b2ca 100644 --- a/sdk/python/requirements/py3.9-ci-requirements.txt +++ b/sdk/python/requirements/py3.9-ci-requirements.txt @@ -911,7 +911,7 @@ traitlets==5.13.0 # nbformat trino==0.327.0 # via feast (setup.py) -typeguard==2.13.3 +typeguard==4.1.5 # via feast (setup.py) types-protobuf==3.19.22 # via diff --git a/sdk/python/requirements/py3.9-requirements.txt b/sdk/python/requirements/py3.9-requirements.txt index 3b6f88b4e2a..027e3e1762c 100644 --- a/sdk/python/requirements/py3.9-requirements.txt +++ b/sdk/python/requirements/py3.9-requirements.txt @@ -196,7 +196,7 @@ toolz==0.12.0 # partd tqdm==4.66.1 # via feast (setup.py) -typeguard==2.13.3 +typeguard==4.1.5 # via feast (setup.py) types-protobuf==4.24.0.4 # via mypy-protobuf diff --git a/sdk/python/tests/unit/test_feature_views.py b/sdk/python/tests/unit/test_feature_views.py index afef332d372..20863645b77 100644 --- a/sdk/python/tests/unit/test_feature_views.py +++ b/sdk/python/tests/unit/test_feature_views.py @@ -1,6 +1,7 @@ from datetime import timedelta import pytest +from typeguard import TypeCheckError from feast.aggregation import Aggregation from feast.batch_feature_view import BatchFeatureView @@ -278,7 +279,7 @@ def test_hash(): def test_field_types(): - with pytest.raises(TypeError): + with pytest.raises(TypeCheckError): Field(name="name", dtype=ValueType.INT32) diff --git a/setup.py b/setup.py index 33bf76e1819..a72a3942ede 100644 --- a/setup.py +++ b/setup.py @@ -70,7 +70,7 @@ "tenacity>=7,<9", "toml>=0.10.0,<1", "tqdm>=4,<5", - "typeguard==2.13.3", + "typeguard>=4.0.0", "fastapi>=0.68.0,<0.100", "uvicorn[standard]>=0.14.0,<1", "gunicorn",