From be922fe5bd6a5300c64f547a918d3236d7c93681 Mon Sep 17 00:00:00 2001 From: ca-simone-chiorazzo <44833596+ca-simone-chiorazzo@users.noreply.github.com> Date: Wed, 14 Oct 2020 16:35:33 +0200 Subject: [PATCH] ISSUE #2377: Relax grpcio requirement for python client to support python3.8 on mac os Descriptions of the changes in this PR: Require a grpcio version that is minor of 1.28. This allow to install the 1.27.2 that has a pre-compiled wheel for python 3.8 on mac os. Add tests for python 3.8 ### Motivation grpcio 1.25.0 does not allow the installation using python 3.8 on mac os x. This is due to the fact that the pre-compiled wheels have not been published before 1.26.0 ### Changes Updated the setup.py to relax a bit the requirement for grpcio Add python3.8 as tested version Updated the setup.py to install the latest pymmh3 version. **Note**: master tests are broken, I've updated the library and removed the 'signed' parameter that does not exists not anymore. Master Issue: # cc eolivelli Reviewers: Enrico Olivelli , Sijie Guo This closes #2432 from ca-simone-chiorazzo/bugfix/2377-relax-grpcio-python-dep-for-python-3.8-on-mac-os, closes #2377 (cherry picked from commit d3af27e202716815d2fc1fd8607853c902653788) Signed-off-by: Enrico Olivelli --- stream/clients/python/bookkeeper/common/router/router.py | 2 +- stream/clients/python/scripts/test.sh | 1 + stream/clients/python/setup.py | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/stream/clients/python/bookkeeper/common/router/router.py b/stream/clients/python/bookkeeper/common/router/router.py index f52ef645e54..8e67dc97df8 100644 --- a/stream/clients/python/bookkeeper/common/router/router.py +++ b/stream/clients/python/bookkeeper/common/router/router.py @@ -27,4 +27,4 @@ def __init__(self): return def getRoutingKey(self, key): - return mmh3.hash64(key, seed=__SEED__, signed=True)[0] + return mmh3.hash64(key, seed=__SEED__)[0] diff --git a/stream/clients/python/scripts/test.sh b/stream/clients/python/scripts/test.sh index df566303092..81ef1a58c96 100755 --- a/stream/clients/python/scripts/test.sh +++ b/stream/clients/python/scripts/test.sh @@ -19,6 +19,7 @@ set -e -x -u SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) +PY_VERSION="3.8" NOXSESSION="unit" ${SCRIPT_DIR}/docker_tests.sh PY_VERSION="3.7" NOXSESSION="lint,lint_setup_py,unit" ${SCRIPT_DIR}/docker_tests.sh PY_VERSION="3.6" NOXSESSION="unit" ${SCRIPT_DIR}/docker_tests.sh PY_VERSION="3.5" NOXSESSION="unit" ${SCRIPT_DIR}/docker_tests.sh diff --git a/stream/clients/python/setup.py b/stream/clients/python/setup.py index 747388ebb13..35ca17b9756 100644 --- a/stream/clients/python/setup.py +++ b/stream/clients/python/setup.py @@ -32,8 +32,8 @@ 'six>=1.10.0', 'pytz', 'futures>=3.2.0;python_version<"3.2"', - 'grpcio<1.26.0,>=1.8.2', - 'pymmh3>=0.0.3' + 'grpcio<1.28,>=1.8.2', + 'pymmh3>=0.0.5' ] extras = { }