From 22b3ccd863f8cab2aaab057d39817a739f8d1ada Mon Sep 17 00:00:00 2001 From: Bhargav Dodla Date: Wed, 18 Sep 2024 11:52:13 -0700 Subject: [PATCH 1/2] fix: Removed protobuf as a required dependency Signed-off-by: Bhargav Dodla --- Makefile | 5 ++++- pyproject.toml | 4 +--- sdk/python/requirements/py3.10-ci-requirements.txt | 1 - sdk/python/requirements/py3.10-requirements.txt | 4 +--- sdk/python/requirements/py3.11-ci-requirements.txt | 1 - sdk/python/requirements/py3.11-requirements.txt | 4 +--- sdk/python/requirements/py3.9-ci-requirements.txt | 1 - sdk/python/requirements/py3.9-requirements.txt | 4 +--- setup.py | 12 ++++-------- 9 files changed, 12 insertions(+), 24 deletions(-) diff --git a/Makefile b/Makefile index 78a0b6d3285..e4bba106c0d 100644 --- a/Makefile +++ b/Makefile @@ -58,7 +58,10 @@ lock-python-ci-dependencies: package-protos: cp -r ${ROOT_DIR}/protos ${ROOT_DIR}/sdk/python/feast/protos -compile-protos-python: +install-protoc-dependencies: + pip install "grpcio-tools>=1.56.2,<2" "mypy-protobuf>=3.1" + +compile-protos-python: install-protoc-dependencies python setup.py build_python_protos --inplace install-python: diff --git a/pyproject.toml b/pyproject.toml index 15921e633cd..283338a8382 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,9 +1,7 @@ [build-system] requires = [ "grpcio-tools>=1.56.2,<2", - "grpcio>=1.56.2,<2", - "mypy-protobuf==3.1", - "protobuf==4.24.0", + "mypy-protobuf>=3.1", "pybindgen==0.22.0", "setuptools>=60", "setuptools_scm>=6.2", diff --git a/sdk/python/requirements/py3.10-ci-requirements.txt b/sdk/python/requirements/py3.10-ci-requirements.txt index 55df7ccb68c..f09f3dded46 100644 --- a/sdk/python/requirements/py3.10-ci-requirements.txt +++ b/sdk/python/requirements/py3.10-ci-requirements.txt @@ -572,7 +572,6 @@ proto-plus==1.24.0 # google-cloud-datastore protobuf==4.25.4 # via - # feast (setup.py) # google-api-core # google-cloud-bigquery-storage # google-cloud-bigtable diff --git a/sdk/python/requirements/py3.10-requirements.txt b/sdk/python/requirements/py3.10-requirements.txt index 3420c8a0e30..1c6f53cf69a 100644 --- a/sdk/python/requirements/py3.10-requirements.txt +++ b/sdk/python/requirements/py3.10-requirements.txt @@ -89,9 +89,7 @@ partd==1.4.2 prometheus-client==0.20.0 # via feast (setup.py) protobuf==4.25.4 - # via - # feast (setup.py) - # mypy-protobuf + # via mypy-protobuf psutil==6.0.0 # via feast (setup.py) pyarrow==17.0.0 diff --git a/sdk/python/requirements/py3.11-ci-requirements.txt b/sdk/python/requirements/py3.11-ci-requirements.txt index 6c5fb02e06b..bed8145e2fa 100644 --- a/sdk/python/requirements/py3.11-ci-requirements.txt +++ b/sdk/python/requirements/py3.11-ci-requirements.txt @@ -563,7 +563,6 @@ proto-plus==1.24.0 # google-cloud-datastore protobuf==4.25.4 # via - # feast (setup.py) # google-api-core # google-cloud-bigquery-storage # google-cloud-bigtable diff --git a/sdk/python/requirements/py3.11-requirements.txt b/sdk/python/requirements/py3.11-requirements.txt index 1d0ce54cc1c..99a994e946b 100644 --- a/sdk/python/requirements/py3.11-requirements.txt +++ b/sdk/python/requirements/py3.11-requirements.txt @@ -87,9 +87,7 @@ partd==1.4.2 prometheus-client==0.20.0 # via feast (setup.py) protobuf==4.25.4 - # via - # feast (setup.py) - # mypy-protobuf + # via mypy-protobuf psutil==6.0.0 # via feast (setup.py) pyarrow==17.0.0 diff --git a/sdk/python/requirements/py3.9-ci-requirements.txt b/sdk/python/requirements/py3.9-ci-requirements.txt index ae27849f4fa..1015f46cffd 100644 --- a/sdk/python/requirements/py3.9-ci-requirements.txt +++ b/sdk/python/requirements/py3.9-ci-requirements.txt @@ -583,7 +583,6 @@ proto-plus==1.24.0 # google-cloud-datastore protobuf==4.25.4 # via - # feast (setup.py) # google-api-core # google-cloud-bigquery-storage # google-cloud-bigtable diff --git a/sdk/python/requirements/py3.9-requirements.txt b/sdk/python/requirements/py3.9-requirements.txt index 8a7ac763c0f..4bd6a448577 100644 --- a/sdk/python/requirements/py3.9-requirements.txt +++ b/sdk/python/requirements/py3.9-requirements.txt @@ -91,9 +91,7 @@ partd==1.4.2 prometheus-client==0.20.0 # via feast (setup.py) protobuf==4.25.4 - # via - # feast (setup.py) - # mypy-protobuf + # via mypy-protobuf psutil==6.0.0 # via feast (setup.py) pyarrow==17.0.0 diff --git a/setup.py b/setup.py index d412541b7d5..f332c21f717 100644 --- a/setup.py +++ b/setup.py @@ -18,10 +18,9 @@ import shutil import subprocess import sys - from pathlib import Path -from setuptools import find_packages, setup, Command +from setuptools import Command, find_packages, setup from setuptools.command.build_ext import build_ext as _build_ext from setuptools.command.build_py import build_py from setuptools.command.develop import develop @@ -43,7 +42,6 @@ "mmh3", "numpy>=1.22,<2", "pandas>=1.4.3,<3", - "protobuf>=4.24.0,<5.0.0", "pyarrow>=4", "pydantic>=2.0.0", "pygments>=2.12.0,<3", @@ -102,7 +100,7 @@ "psycopg[binary,pool]>=3.0.0,<4", ] -OPENTELEMETRY = ["prometheus_client","psutil"] +OPENTELEMETRY = ["prometheus_client", "psutil"] MYSQL_REQUIRED = ["pymysql", "types-PyMySQL"] @@ -139,7 +137,6 @@ GRPCIO_REQUIRED = [ "grpcio>=1.56.2,<2", - "grpcio-tools>=1.56.2,<2", "grpcio-reflection>=1.56.2,<2", "grpcio-health-checking>=1.56.2,<2", ] @@ -160,6 +157,7 @@ "virtualenv==20.23.0", "cryptography>=35.0,<43", "ruff>=0.3.3", + "grpcio-tools>=1.56.2,<2", "grpcio-testing>=1.56.2,<2", # FastAPI does not correctly pull starlette dependency on httpx see thread(https://github.com/tiangolo/fastapi/issues/5656). "httpx>=0.23.3", @@ -403,9 +401,7 @@ def run(self): use_scm_version=use_scm_version, setup_requires=[ "grpcio-tools>=1.56.2,<2", - "grpcio>=1.56.2,<2", - "mypy-protobuf==3.1", - "protobuf==4.24.0", + "mypy-protobuf>=3.1", "pybindgen==0.22.0", "setuptools_scm>=6.2", ], From 54fd9767f1141546a3b3f01dacc7b50e675cf4c2 Mon Sep 17 00:00:00 2001 From: Bhargav Dodla Date: Wed, 18 Sep 2024 12:21:00 -0700 Subject: [PATCH 2/2] fix: Removed install-protoc-dependencies target Signed-off-by: Bhargav Dodla --- Makefile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Makefile b/Makefile index e4bba106c0d..78a0b6d3285 100644 --- a/Makefile +++ b/Makefile @@ -58,10 +58,7 @@ lock-python-ci-dependencies: package-protos: cp -r ${ROOT_DIR}/protos ${ROOT_DIR}/sdk/python/feast/protos -install-protoc-dependencies: - pip install "grpcio-tools>=1.56.2,<2" "mypy-protobuf>=3.1" - -compile-protos-python: install-protoc-dependencies +compile-protos-python: python setup.py build_python_protos --inplace install-python: