diff --git a/sdks/python/tox.ini b/sdks/python/tox.ini index c69fc2e45ef7..912050c013cf 100644 --- a/sdks/python/tox.ini +++ b/sdks/python/tox.ini @@ -439,15 +439,18 @@ commands = pytest -o junit_suite_name={envname} --junitxml=pytest_{envname}.xml -n 6 -m uses_onnx {posargs} [testenv:py311-tensorflow-212] +constrain_package_deps = True +use_frozen_constraints = True deps = + protobuf==4.25.5 + setuptools<82 212: googleapis-common-protos<1.70 tensorflow>=2.12rc1,<2.13 + tensorflow-hub>=0.14.0,<0.16.0 # Help pip resolve conflict with typing-extensions for old version of TF https://github.com/apache/beam/issues/30852 pydantic<2.7 -extras = test,gcp -commands_pre = - pip install -U 'protobuf==4.25.5' +extras = test commands = # Log tensorflow version for debugging /bin/sh -c "pip freeze | grep -E tensorflow" @@ -456,14 +459,17 @@ commands = /bin/sh -c 'pytest -o junit_suite_name={envname} --junitxml=pytest_{envname}.xml -n 6 -m uses_tf {posargs}; ret=$?; [ $ret = 5 ] && exit 0 || exit $ret' [testenv:py312-tensorflow-216] +constrain_package_deps = True +use_frozen_constraints = True deps = + protobuf==4.25.5 + setuptools<82 216: tensorflow>=2.16.1,<2.17 + tensorflow-hub>=0.16.1,<0.17 # Help pip resolve conflict with typing-extensions for old version of TF https://github.com/apache/beam/issues/30852 pydantic<2.7 -extras = test,gcp -commands_pre = - pip install -U 'protobuf==4.25.5' +extras = test commands = # Log tensorflow version for debugging /bin/sh -c "pip freeze | grep -E tensorflow"