From e7a785846df3723e36084dcbc7b086535084fb8a Mon Sep 17 00:00:00 2001 From: Anand Inguva Date: Thu, 8 Dec 2022 15:48:36 -0500 Subject: [PATCH] Update build dependencies and mypy-protobuf --- sdks/python/build-requirements.txt | 17 +++-------------- sdks/python/setup.py | 20 +++++++++++--------- 2 files changed, 14 insertions(+), 23 deletions(-) diff --git a/sdks/python/build-requirements.txt b/sdks/python/build-requirements.txt index 1a17eb29fa1fc..ad7424806404d 100644 --- a/sdks/python/build-requirements.txt +++ b/sdks/python/build-requirements.txt @@ -18,22 +18,11 @@ # TODO(https://github.com/apache/beam/issues/20051): Consider PEP-517/PEP-518 instead of this file. setuptools -# grpcio-tools depends on grpcio and the grpcio>1.50.0 results in error(ImportModuleError six) -# when installing Apache Beam source via pip install -e . -# Adding six as part of build dependencies. -# https://github.com/apache/beam/issues/24432 -six wheel>=0.36.0 - -grpcio-tools==1.37.0 -# TODO(https://github.com/apache/beam/issues/23734): the sdist for grpcio==1.50.0 is failing on GH workers -# pin grpcio to the previous version. -grpcio==1.49.1;sys_platform=="darwin" -mypy-protobuf==1.18 -protobuf==3.19.4;python_version=="3.10" and sys_platform=="darwin" - +grpcio-tools==1.51.1 +mypy-protobuf==3.4.0 # Avoid https://github.com/pypa/virtualenv/issues/2006 -distlib==0.3.1 +distlib==0.3.6 # Numpy headers numpy>=1.14.3,<1.23.0 diff --git a/sdks/python/setup.py b/sdks/python/setup.py index f55b66f400540..023f42f6ce436 100644 --- a/sdks/python/setup.py +++ b/sdks/python/setup.py @@ -180,15 +180,17 @@ def get_portability_package_data(): generate_protos_first() # Keep all dependencies inlined in the setup call, otherwise Dependabot won't # be able to parse it. - if sys.platform == 'darwin' and ( - sys.version_info.major == 3 and sys.version_info.minor == 10): - # TODO (https://github.com/apache/beam/issues/23585): Protobuf wheels - # for version 3.19.5, 3.19.6 and 3.20.x on Python 3.10 and MacOS are - # rolled back due to some errors on MacOS. So, for Python 3.10 on MacOS - # restrict the protobuf with tight upper bound(3.19.4) - protobuf_dependency = ['protobuf>3.12.2,<3.19.5'] - else: - protobuf_dependency = ['protobuf>3.12.2,<4'] + # if sys.platform == 'darwin' and ( + # sys.version_info.major == 3 and sys.version_info.minor == 10): + # # TODO (https://github.com/apache/beam/issues/23585): Protobuf wheels + # # for version 3.19.5, 3.19.6 and 3.20.x on Python 3.10 and MacOS are + # # rolled back due to some errors on MacOS. So, for Python 3.10 on MacOS + # # restrict the protobuf with tight upper bound(3.19.4) + # protobuf_dependency = ['protobuf>3.12.2,<3.19.5'] + # else: + # protobuf_dependency = ['protobuf>3.12.2,<4'] + + protobuf_dependency = ['protobuf>=4.21.1,<=4.21.11'] setuptools.setup( name=PACKAGE_NAME,