From 4452a6c8d9758c9cd3ea39d37aaf149927c633ce Mon Sep 17 00:00:00 2001 From: tvalentyn Date: Fri, 5 Apr 2024 16:43:54 -0700 Subject: [PATCH] Adds a bound on pydantic to exclude incompatible versions in the compat test. (#30863) * Add a lower bound on pydantic * Add an upper bound on pydantic in the respective test suite. * Restrict deps some more. --- sdks/python/tox.ini | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sdks/python/tox.ini b/sdks/python/tox.ini index 86d12f31a18e..153b6acde8e7 100644 --- a/sdks/python/tox.ini +++ b/sdks/python/tox.ini @@ -102,7 +102,7 @@ passenv = GIT_*,BUILD_*,ghprb*,CHANGE_ID,BRANCH_NAME,JENKINS_*,CODECOV_*,GITHUB_ extras = test,gcp,interactive,dataframe,aws commands = bash {toxinidir}/scripts/run_pytest.sh {envname} "{posargs}" "--cov-report=xml --cov=. --cov-append" - + [testenv:py38-lint] # Don't set TMPDIR to avoid "AF_UNIX path too long" errors in pylint. setenv = @@ -314,6 +314,8 @@ commands = [testenv:py{38,39}-tft-{113,114}] deps = 113: tensorflow_transform>=1.13.0,<1.14.0 + # Help pip resolve conflict with typing-extensions due to an old version of tensorflow https://github.com/apache/beam/issues/30852 + 113: pydantic<2.0 114: tensorflow_transform>=1.14.0,<1.15.0 commands = bash {toxinidir}/scripts/run_pytest.sh {envname} 'apache_beam/ml/transforms apache_beam/examples/snippets/transforms/elementwise/mltransform_test.py' @@ -373,6 +375,8 @@ commands = [testenv:py{38,39,310}-tensorflow-212] deps = 212: tensorflow>=2.12rc1,<2.13 + # Help pip resolve conflict with typing-extensions for old version of TF https://github.com/apache/beam/issues/30852 + 212: pydantic<2.7 extras = test,gcp commands = # Log tensorflow version for debugging @@ -444,6 +448,8 @@ commands = deps = 014: tensorflow-hub>=0.14.0,<0.15.0 015: tensorflow-hub>=0.15.0,<0.16.0 + # Help pip resolve conflict with typing-extensions due to an old version of tensorboard https://github.com/apache/beam/issues/30852 + 015: pydantic<2.7 tensorflow-text # required to register ops for text embedding models. extras = test,gcp