From 791add3363d69369f37108e990aaa80365f36af9 Mon Sep 17 00:00:00 2001 From: Anand Inguva Date: Wed, 1 Jun 2022 00:44:20 -0400 Subject: [PATCH 1/5] Update Pytest version to support Python 3.10 --- sdks/python/setup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sdks/python/setup.py b/sdks/python/setup.py index ef8f73a0477d..342ca051c2c0 100644 --- a/sdks/python/setup.py +++ b/sdks/python/setup.py @@ -249,9 +249,9 @@ def get_portability_package_data(): 'pyyaml>=3.12,<7.0.0', 'requests_mock>=1.7,<2.0', 'tenacity>=5.0.2,<6.0', - 'pytest>=4.4.0,<5.0', - 'pytest-xdist>=1.29.0,<2', - 'pytest-timeout>=1.3.3,<2', + 'pytest>=7.1.2,<8.0', + 'pytest-xdist>=2.5.0,<3', + 'pytest-timeout>=2.1.0,<3', 'scikit-learn>=0.20.0', 'sqlalchemy>=1.3,<2.0', 'psycopg2-binary>=2.8.5,<3.0.0', From ef19c255bd4c47c11c8399fe2d2ba751999c4dd9 Mon Sep 17 00:00:00 2001 From: Anand Inguva Date: Fri, 17 Jun 2022 19:03:16 -0400 Subject: [PATCH 2/5] Update pytest-cov --- sdks/python/tox.ini | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sdks/python/tox.ini b/sdks/python/tox.ini index 1b8da2593215..75e67578f230 100644 --- a/sdks/python/tox.ini +++ b/sdks/python/tox.ini @@ -93,10 +93,9 @@ commands = {toxinidir}/scripts/run_pytest.sh {envname} "{posargs}" [testenv:py38-cloudcoverage] -# More recent versions of pytest-cov do not support pytest 4.4.0 deps = codecov - pytest-cov==2.9.0 + pytest-cov==3.0.0 passenv = GIT_* BUILD_* ghprb* CHANGE_ID BRANCH_NAME JENKINS_* CODECOV_* extras = test,gcp,interactive,dataframe,aws commands = From db2c05fd9224602567271459d135251d9f46e3c9 Mon Sep 17 00:00:00 2001 From: Anand Inguva Date: Mon, 11 Jul 2022 10:54:05 +0000 Subject: [PATCH 3/5] update dependencies with updated pytest related changes --- .../py37/base_image_requirements.txt | 51 +++++++++--------- .../py38/base_image_requirements.txt | 53 +++++++++---------- .../py39/base_image_requirements.txt | 53 +++++++++---------- 3 files changed, 77 insertions(+), 80 deletions(-) diff --git a/sdks/python/container/py37/base_image_requirements.txt b/sdks/python/container/py37/base_image_requirements.txt index 2e92ee715441..60d971bb9dfe 100644 --- a/sdks/python/container/py37/base_image_requirements.txt +++ b/sdks/python/container/py37/base_image_requirements.txt @@ -23,32 +23,31 @@ absl-py==1.1.0 astunparse==1.6.3 -atomicwrites==1.4.1 attrs==21.4.0 beautifulsoup4==4.11.1 bs4==0.0.1 cachetools==4.2.4 certifi==2022.6.15 -cffi==1.15.0 -charset-normalizer==2.0.12 +cffi==1.15.1 +charset-normalizer==2.1.0 click==8.1.3 cloudpickle==2.1.0 crcmod==1.7 -cryptography==37.0.2 +cryptography==37.0.4 Cython==0.29.30 deprecation==2.1.0 dill==0.3.1.1 docker==5.0.3 docopt==0.6.2 execnet==1.9.0 -fastavro==1.5.1 +fastavro==1.5.2 fasteners==0.17.3 flatbuffers==1.12 freezegun==1.2.1 future==0.18.2 gast==0.4.0 google-api-core==1.31.6 -google-api-python-client==2.51.0 +google-api-python-client==2.52.0 google-apitools==0.5.31 google-auth==1.35.0 google-auth-httplib2==0.1.0 @@ -60,8 +59,8 @@ google-cloud-core==1.7.2 google-cloud-datastore==1.15.5 google-cloud-dlp==3.7.1 google-cloud-language==1.3.2 -google-cloud-profiler==3.1.0 -google-cloud-pubsub==2.13.0 +google-cloud-profiler==4.0.0 +google-cloud-pubsub==2.13.1 google-cloud-pubsublite==1.4.2 google-cloud-recommendations-ai==0.2.0 google-cloud-spanner==1.19.3 @@ -71,18 +70,19 @@ google-crc32c==1.3.0 google-pasta==0.2.0 google-python-cloud-debugger==2.18 google-resumable-media==2.3.3 -googleapis-common-protos==1.56.2 +googleapis-common-protos==1.56.3 greenlet==1.1.2 grpc-google-iam-v1==0.12.4 -grpcio==1.46.3 +grpcio==1.47.0 grpcio-gcp==0.2.2 -grpcio-status==1.46.3 +grpcio-status==1.47.0 guppy3==3.1.2 h5py==3.7.0 hdfs==2.7.0 httplib2==0.20.4 idna==3.3 -importlib-metadata==4.11.4 +importlib-metadata==4.12.0 +iniconfig==1.1.1 joblib==1.1.0 keras==2.9.0 Keras-Preprocessing==1.1.2 @@ -90,20 +90,19 @@ libclang==14.0.1 Markdown==3.3.7 mmh3==3.0.0 mock==2.0.0 -more-itertools==8.13.0 nltk==3.7 nose==1.3.7 numpy==1.21.6 oauth2client==4.1.3 oauthlib==3.2.0 opt-einsum==3.3.0 -orjson==3.7.2 +orjson==3.7.7 overrides==6.1.0 packaging==21.3 pandas==1.3.5 -parameterized==0.7.5 +parameterized==0.8.1 pbr==5.9.0 -pluggy==0.13.1 +pluggy==1.0.0 proto-plus==1.20.6 protobuf==3.19.4 psycopg2-binary==2.9.3 @@ -117,16 +116,16 @@ PyHamcrest==1.10.1 pymongo==3.12.3 PyMySQL==1.0.2 pyparsing==3.0.9 -pytest==4.6.11 +pytest==7.1.2 pytest-forked==1.4.0 -pytest-timeout==1.4.2 -pytest-xdist==1.34.0 +pytest-timeout==2.1.0 +pytest-xdist==2.5.0 python-dateutil==2.8.2 python-snappy==0.6.1 pytz==2022.1 PyYAML==6.0 -regex==2022.6.2 -requests==2.28.0 +regex==2022.7.9 +requests==2.28.1 requests-mock==1.9.3 requests-oauthlib==1.3.1 rsa==4.8 @@ -134,7 +133,7 @@ scikit-learn==1.0.2 scipy==1.7.3 six==1.16.0 soupsieve==2.3.2.post1 -SQLAlchemy==1.4.37 +SQLAlchemy==1.4.39 tenacity==5.1.5 tensorboard==2.9.1 tensorboard-data-server==0.6.1 @@ -145,13 +144,13 @@ tensorflow-io-gcs-filesystem==0.26.0 termcolor==1.1.0 testcontainers==3.6.0 threadpoolctl==3.1.0 +tomli==2.0.1 tqdm==4.64.0 typing-utils==0.1.0 -typing_extensions==4.2.0 +typing_extensions==4.3.0 uritemplate==4.1.1 -urllib3==1.26.9 -wcwidth==0.2.5 -websocket-client==1.3.2 +urllib3==1.26.10 +websocket-client==1.3.3 Werkzeug==2.1.2 wrapt==1.14.1 zipp==3.8.0 diff --git a/sdks/python/container/py38/base_image_requirements.txt b/sdks/python/container/py38/base_image_requirements.txt index f7c4b1f512f7..b701779c1e4c 100644 --- a/sdks/python/container/py38/base_image_requirements.txt +++ b/sdks/python/container/py38/base_image_requirements.txt @@ -23,32 +23,31 @@ absl-py==1.1.0 astunparse==1.6.3 -atomicwrites==1.4.1 attrs==21.4.0 beautifulsoup4==4.11.1 bs4==0.0.1 cachetools==4.2.4 certifi==2022.6.15 -cffi==1.15.0 -charset-normalizer==2.0.12 +cffi==1.15.1 +charset-normalizer==2.1.0 click==8.1.3 cloudpickle==2.1.0 crcmod==1.7 -cryptography==37.0.2 +cryptography==37.0.4 Cython==0.29.30 deprecation==2.1.0 dill==0.3.1.1 docker==5.0.3 docopt==0.6.2 execnet==1.9.0 -fastavro==1.5.1 +fastavro==1.5.2 fasteners==0.17.3 flatbuffers==1.12 freezegun==1.2.1 future==0.18.2 gast==0.4.0 google-api-core==1.31.6 -google-api-python-client==2.51.0 +google-api-python-client==2.52.0 google-apitools==0.5.31 google-auth==1.35.0 google-auth-httplib2==0.1.0 @@ -60,8 +59,8 @@ google-cloud-core==1.7.2 google-cloud-datastore==1.15.5 google-cloud-dlp==3.7.1 google-cloud-language==1.3.2 -google-cloud-profiler==3.1.0 -google-cloud-pubsub==2.13.0 +google-cloud-profiler==4.0.0 +google-cloud-pubsub==2.13.1 google-cloud-pubsublite==1.4.2 google-cloud-recommendations-ai==0.2.0 google-cloud-spanner==1.19.3 @@ -71,18 +70,19 @@ google-crc32c==1.3.0 google-pasta==0.2.0 google-python-cloud-debugger==2.18 google-resumable-media==2.3.3 -googleapis-common-protos==1.56.2 +googleapis-common-protos==1.56.3 greenlet==1.1.2 grpc-google-iam-v1==0.12.4 -grpcio==1.46.3 +grpcio==1.47.0 grpcio-gcp==0.2.2 -grpcio-status==1.46.3 +grpcio-status==1.47.0 guppy3==3.1.2 h5py==3.7.0 hdfs==2.7.0 httplib2==0.20.4 idna==3.3 -importlib-metadata==4.11.4 +importlib-metadata==4.12.0 +iniconfig==1.1.1 joblib==1.1.0 keras==2.9.0 Keras-Preprocessing==1.1.2 @@ -90,20 +90,19 @@ libclang==14.0.1 Markdown==3.3.7 mmh3==3.0.0 mock==2.0.0 -more-itertools==8.13.0 nltk==3.7 nose==1.3.7 numpy==1.22.4 oauth2client==4.1.3 oauthlib==3.2.0 opt-einsum==3.3.0 -orjson==3.7.2 +orjson==3.7.7 overrides==6.1.0 packaging==21.3 -pandas==1.4.2 -parameterized==0.7.5 +pandas==1.4.3 +parameterized==0.8.1 pbr==5.9.0 -pluggy==0.13.1 +pluggy==1.0.0 proto-plus==1.20.6 protobuf==3.19.4 psycopg2-binary==2.9.3 @@ -117,16 +116,16 @@ PyHamcrest==1.10.1 pymongo==3.12.3 PyMySQL==1.0.2 pyparsing==3.0.9 -pytest==4.6.11 +pytest==7.1.2 pytest-forked==1.4.0 -pytest-timeout==1.4.2 -pytest-xdist==1.34.0 +pytest-timeout==2.1.0 +pytest-xdist==2.5.0 python-dateutil==2.8.2 python-snappy==0.6.1 pytz==2022.1 PyYAML==6.0 -regex==2022.6.2 -requests==2.28.0 +regex==2022.7.9 +requests==2.28.1 requests-mock==1.9.3 requests-oauthlib==1.3.1 rsa==4.8 @@ -134,7 +133,7 @@ scikit-learn==1.1.1 scipy==1.8.1 six==1.16.0 soupsieve==2.3.2.post1 -SQLAlchemy==1.4.37 +SQLAlchemy==1.4.39 tenacity==5.1.5 tensorboard==2.9.1 tensorboard-data-server==0.6.1 @@ -145,13 +144,13 @@ tensorflow-io-gcs-filesystem==0.26.0 termcolor==1.1.0 testcontainers==3.6.0 threadpoolctl==3.1.0 +tomli==2.0.1 tqdm==4.64.0 typing-utils==0.1.0 -typing_extensions==4.2.0 +typing_extensions==4.3.0 uritemplate==4.1.1 -urllib3==1.26.9 -wcwidth==0.2.5 -websocket-client==1.3.2 +urllib3==1.26.10 +websocket-client==1.3.3 Werkzeug==2.1.2 wrapt==1.14.1 zipp==3.8.0 diff --git a/sdks/python/container/py39/base_image_requirements.txt b/sdks/python/container/py39/base_image_requirements.txt index e3e556fe7c9f..4e6169418b6c 100644 --- a/sdks/python/container/py39/base_image_requirements.txt +++ b/sdks/python/container/py39/base_image_requirements.txt @@ -23,32 +23,31 @@ absl-py==1.1.0 astunparse==1.6.3 -atomicwrites==1.4.1 attrs==21.4.0 beautifulsoup4==4.11.1 bs4==0.0.1 cachetools==4.2.4 certifi==2022.6.15 -cffi==1.15.0 -charset-normalizer==2.0.12 +cffi==1.15.1 +charset-normalizer==2.1.0 click==8.1.3 cloudpickle==2.1.0 crcmod==1.7 -cryptography==37.0.2 +cryptography==37.0.4 Cython==0.29.30 deprecation==2.1.0 dill==0.3.1.1 docker==5.0.3 docopt==0.6.2 execnet==1.9.0 -fastavro==1.5.1 +fastavro==1.5.2 fasteners==0.17.3 flatbuffers==1.12 freezegun==1.2.1 future==0.18.2 gast==0.4.0 google-api-core==1.31.6 -google-api-python-client==2.51.0 +google-api-python-client==2.52.0 google-apitools==0.5.31 google-auth==1.35.0 google-auth-httplib2==0.1.0 @@ -60,8 +59,8 @@ google-cloud-core==1.7.2 google-cloud-datastore==1.15.5 google-cloud-dlp==3.7.1 google-cloud-language==1.3.2 -google-cloud-profiler==3.1.0 -google-cloud-pubsub==2.13.0 +google-cloud-profiler==4.0.0 +google-cloud-pubsub==2.13.1 google-cloud-pubsublite==1.4.2 google-cloud-recommendations-ai==0.2.0 google-cloud-spanner==1.19.3 @@ -71,18 +70,19 @@ google-crc32c==1.3.0 google-pasta==0.2.0 google-python-cloud-debugger==2.18 google-resumable-media==2.3.3 -googleapis-common-protos==1.56.2 +googleapis-common-protos==1.56.3 greenlet==1.1.2 grpc-google-iam-v1==0.12.4 -grpcio==1.46.3 +grpcio==1.47.0 grpcio-gcp==0.2.2 -grpcio-status==1.46.3 +grpcio-status==1.47.0 guppy3==3.1.2 h5py==3.7.0 hdfs==2.7.0 httplib2==0.20.4 idna==3.3 -importlib-metadata==4.11.4 +importlib-metadata==4.12.0 +iniconfig==1.1.1 joblib==1.1.0 keras==2.9.0 Keras-Preprocessing==1.1.2 @@ -90,20 +90,19 @@ libclang==14.0.1 Markdown==3.3.7 mmh3==3.0.0 mock==2.0.0 -more-itertools==8.13.0 nltk==3.7 nose==1.3.7 numpy==1.22.4 oauth2client==4.1.3 oauthlib==3.2.0 opt-einsum==3.3.0 -orjson==3.7.2 +orjson==3.7.7 overrides==6.1.0 packaging==21.3 -pandas==1.4.2 -parameterized==0.7.5 +pandas==1.4.3 +parameterized==0.8.1 pbr==5.9.0 -pluggy==0.13.1 +pluggy==1.0.0 proto-plus==1.20.6 protobuf==3.19.4 psycopg2-binary==2.9.3 @@ -117,16 +116,16 @@ PyHamcrest==1.10.1 pymongo==3.12.3 PyMySQL==1.0.2 pyparsing==3.0.9 -pytest==4.6.11 +pytest==7.1.2 pytest-forked==1.4.0 -pytest-timeout==1.4.2 -pytest-xdist==1.34.0 +pytest-timeout==2.1.0 +pytest-xdist==2.5.0 python-dateutil==2.8.2 python-snappy==0.6.1 pytz==2022.1 PyYAML==6.0 -regex==2022.6.2 -requests==2.28.0 +regex==2022.7.9 +requests==2.28.1 requests-mock==1.9.3 requests-oauthlib==1.3.1 rsa==4.8 @@ -134,7 +133,7 @@ scikit-learn==1.1.1 scipy==1.8.1 six==1.16.0 soupsieve==2.3.2.post1 -SQLAlchemy==1.4.37 +SQLAlchemy==1.4.39 tenacity==5.1.5 tensorboard==2.9.1 tensorboard-data-server==0.6.1 @@ -145,13 +144,13 @@ tensorflow-io-gcs-filesystem==0.26.0 termcolor==1.1.0 testcontainers==3.6.0 threadpoolctl==3.1.0 +tomli==2.0.1 tqdm==4.64.0 typing-utils==0.1.0 -typing_extensions==4.2.0 +typing_extensions==4.3.0 uritemplate==4.1.1 -urllib3==1.26.9 -wcwidth==0.2.5 -websocket-client==1.3.2 +urllib3==1.26.10 +websocket-client==1.3.3 Werkzeug==2.1.2 wrapt==1.14.1 zipp==3.8.0 From 4532e7817029a20776dd86d7451bed4fa766197c Mon Sep 17 00:00:00 2001 From: Anand Inguva Date: Wed, 27 Jul 2022 20:02:25 +0530 Subject: [PATCH 4/5] set upToDateWhen = false --- .../main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy | 1 + 1 file changed, 1 insertion(+) diff --git a/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy b/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy index 2e5cf0eccf2b..d1ac43fa1448 100644 --- a/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy +++ b/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy @@ -2509,6 +2509,7 @@ class BeamModulePlugin implements Plugin { // specific binary here could make gradle delete it while pip will believe // the package is fully installed. outputs.dirs(project.ext.envdir) + outputs.upToDateWhen { false } } project.ext.pythonSdkDeps = project.files( From a8a01f59c793089dedbefcc7f0cdbdfccd08414f Mon Sep 17 00:00:00 2001 From: Anand Inguva Date: Thu, 28 Jul 2022 21:05:08 +0000 Subject: [PATCH 5/5] update-requirements-file --- sdks/python/container/py37/base_image_requirements.txt | 4 ++-- sdks/python/container/py38/base_image_requirements.txt | 4 ++-- sdks/python/container/py39/base_image_requirements.txt | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sdks/python/container/py37/base_image_requirements.txt b/sdks/python/container/py37/base_image_requirements.txt index ec5649444700..c822c725887c 100644 --- a/sdks/python/container/py37/base_image_requirements.txt +++ b/sdks/python/container/py37/base_image_requirements.txt @@ -23,7 +23,7 @@ absl-py==1.2.0 astunparse==1.6.3 -attrs==21.4.0 +attrs==22.1.0 beautifulsoup4==4.11.1 bs4==0.0.1 cachetools==4.2.4 @@ -82,6 +82,7 @@ hdfs==2.7.0 httplib2==0.20.4 idna==3.3 importlib-metadata==4.12.0 +iniconfig==1.1.1 joblib==1.1.0 keras==2.9.0 Keras-Preprocessing==1.1.2 @@ -150,7 +151,6 @@ typing-utils==0.1.0 typing_extensions==4.3.0 uritemplate==4.1.1 urllib3==1.26.11 -wcwidth==0.2.5 websocket-client==1.3.3 Werkzeug==2.2.1 wrapt==1.14.1 diff --git a/sdks/python/container/py38/base_image_requirements.txt b/sdks/python/container/py38/base_image_requirements.txt index a0e086fc1a40..a4ae2992e25f 100644 --- a/sdks/python/container/py38/base_image_requirements.txt +++ b/sdks/python/container/py38/base_image_requirements.txt @@ -23,7 +23,7 @@ absl-py==1.2.0 astunparse==1.6.3 -attrs==21.4.0 +attrs==22.1.0 beautifulsoup4==4.11.1 bs4==0.0.1 cachetools==4.2.4 @@ -82,6 +82,7 @@ hdfs==2.7.0 httplib2==0.20.4 idna==3.3 importlib-metadata==4.12.0 +iniconfig==1.1.1 joblib==1.1.0 keras==2.9.0 Keras-Preprocessing==1.1.2 @@ -150,7 +151,6 @@ typing-utils==0.1.0 typing_extensions==4.3.0 uritemplate==4.1.1 urllib3==1.26.11 -wcwidth==0.2.5 websocket-client==1.3.3 Werkzeug==2.2.1 wrapt==1.14.1 diff --git a/sdks/python/container/py39/base_image_requirements.txt b/sdks/python/container/py39/base_image_requirements.txt index 709f26d99b8e..4631bf980209 100644 --- a/sdks/python/container/py39/base_image_requirements.txt +++ b/sdks/python/container/py39/base_image_requirements.txt @@ -23,7 +23,7 @@ absl-py==1.2.0 astunparse==1.6.3 -attrs==21.4.0 +attrs==22.1.0 beautifulsoup4==4.11.1 bs4==0.0.1 cachetools==4.2.4 @@ -82,6 +82,7 @@ hdfs==2.7.0 httplib2==0.20.4 idna==3.3 importlib-metadata==4.12.0 +iniconfig==1.1.1 joblib==1.1.0 keras==2.9.0 Keras-Preprocessing==1.1.2 @@ -150,7 +151,6 @@ typing-utils==0.1.0 typing_extensions==4.3.0 uritemplate==4.1.1 urllib3==1.26.11 -wcwidth==0.2.5 websocket-client==1.3.3 Werkzeug==2.2.1 wrapt==1.14.1