From 599572c8b318e16d27d6fdfd14d86d7c21988ebb Mon Sep 17 00:00:00 2001 From: jrmccluskey Date: Tue, 27 Oct 2026 18:24:47 +0000 Subject: [PATCH 1/2] [Experimental] Move pinned pip in setupVirtualenv to 26.2.2 --- .../trigger_files/beam_PostCommit_Python_Dependency.json | 2 +- .../trigger_files/beam_PreCommit_Yaml_Xlang_Direct.json | 2 +- .../groovy/org/apache/beam/gradle/BeamModulePlugin.groovy | 7 ++----- sdks/python/setup.py | 2 +- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/trigger_files/beam_PostCommit_Python_Dependency.json b/.github/trigger_files/beam_PostCommit_Python_Dependency.json index 0c0e8ca6a12b..f3bc9e958674 100644 --- a/.github/trigger_files/beam_PostCommit_Python_Dependency.json +++ b/.github/trigger_files/beam_PostCommit_Python_Dependency.json @@ -1,4 +1,4 @@ { "comment": "Modify this file in a trivial way to cause this test suite to run", - "modification": 8 + "modification": 9 } diff --git a/.github/trigger_files/beam_PreCommit_Yaml_Xlang_Direct.json b/.github/trigger_files/beam_PreCommit_Yaml_Xlang_Direct.json index 840d064bdbb0..b5f28fee1536 100644 --- a/.github/trigger_files/beam_PreCommit_Yaml_Xlang_Direct.json +++ b/.github/trigger_files/beam_PreCommit_Yaml_Xlang_Direct.json @@ -1,4 +1,4 @@ { "comment": "Modify this file in a trivial way to cause this test suite to run", - "revision": 3 + "revision": 4 } 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 1e1c9108de76..761907e47c97 100644 --- a/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy +++ b/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy @@ -3176,12 +3176,9 @@ class BeamModulePlugin implements Plugin { } project.exec { executable 'sh' - // TODO: https://github.com/apache/beam/issues/29022 - // pip 23.3 is failing due to Hash mismatch between expected SHA of the packaged and actual SHA. - // until it is resolved on pip's side, don't use pip's cache. - // pip 25.1 casues :sdks:python:installGcpTest stuck. Pin to 25.0.1 for now. + // Pin pip after emSign root CA vulnerability fix. args '-c', ". ${project.ext.envdir}/bin/activate && " + - "python -m pip install --pre --retries 10 --upgrade pip==25.0.1 --no-cache-dir && " + + "python -m pip install --pre --retries 10 --upgrade pip==26.2.2 --no-cache-dir && " + "python -m pip install --pre --retries 10 --upgrade tox --no-cache-dir && " + "python -m pip install --pre --retries 10 --upgrade setuptools build --no-cache-dir" } diff --git a/sdks/python/setup.py b/sdks/python/setup.py index 98d5b631f13b..5008554d5fd5 100644 --- a/sdks/python/setup.py +++ b/sdks/python/setup.py @@ -98,7 +98,7 @@ def get_version(): PACKAGE_EMAIL = 'dev@beam.apache.org' PACKAGE_KEYWORDS = 'apache beam' -RECOMMENDED_MIN_PIP_VERSION = '19.3.0' +RECOMMENDED_MIN_PIP_VERSION = '26.2.2' try: _PIP_VERSION = distribution('pip').version if parse(_PIP_VERSION) < parse(RECOMMENDED_MIN_PIP_VERSION): From d4dc0ff406e759f8e9cbbfc525f26c17b76cb0f0 Mon Sep 17 00:00:00 2001 From: jrmccluskey Date: Wed, 28 Oct 2026 12:46:56 +0000 Subject: [PATCH 2/2] Remove hard-coded tox environment pip versions --- 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 808972897336..a0384802253d 100644 --- a/sdks/python/tox.ini +++ b/sdks/python/tox.ini @@ -109,7 +109,6 @@ commands = [testenv:py311-ml] # Don't set TMPDIR to avoid "AF_UNIX path too long" errors in certain tests. deps = - pip==25.0.1 accelerate>=1.6.0 onnx<1.19.0 setenv = @@ -492,7 +491,7 @@ setenv = # Keep in line with the transformers extra in setup.py. # tensorflow-hub is needed by the TensorFlow handler tests; it imports # pkg_resources, which was removed in setuptools 82. - COMMON_DEPS = 'tensorflow>=2.16,<2.22' tf-keras tensorflow-hub 'setuptools<82' sentence-transformers pip==25.0.1 + COMMON_DEPS = 'tensorflow>=2.16,<2.22' tf-keras tensorflow-hub 'setuptools<82' sentence-transformers # Lower bound of the supported range. 441: DEPS = 'transformers>=4.41.0,<4.42.0' 'torch>=2.3.0,<2.4.0' # Last transformers release line with TensorFlow support.