You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by jr...@apache.org on 2026/07/29 17:43:42 UTC

(beam) branch master updated: Bump lower and upper bounds for pyarrow + related dependencies, remove unnecessary CVE hotfix (#39530)

This is an automated email from the ASF dual-hosted git repository.

jrmccluskey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git


The following commit(s) were added to refs/heads/master by this push:
     new 6e2044b0083 Bump lower and upper bounds for pyarrow + related dependencies, remove unnecessary CVE hotfix (#39530)
6e2044b0083 is described below

commit 6e2044b0083592870a4592a98dff7065fbd22631
Author: Jack McCluskey <34...@users.noreply.github.com>
AuthorDate: Wed Jul 29 13:43:31 2026 -0400

    Bump lower and upper bounds for pyarrow + related dependencies, remove unnecessary CVE hotfix (#39530)
    
    * Bump lower and upper bounds for pyarrow, remove unnecessary CVE hotfix
    
    * tighten bounds further, match with our testing environment
    
    * transitive deps
    
    * Update sdks/python/setup.py
    
    Co-authored-by: Danny McCormick <da...@google.com>
    
    ---------
    
    Co-authored-by: Danny McCormick <da...@google.com>
---
 sdks/python/setup.py | 27 ++++++++++-----------------
 sdks/python/tox.ini  | 11 +++--------
 2 files changed, 13 insertions(+), 25 deletions(-)

diff --git a/sdks/python/setup.py b/sdks/python/setup.py
index 5ffa191e900..8af7c7705f0 100644
--- a/sdks/python/setup.py
+++ b/sdks/python/setup.py
@@ -150,11 +150,10 @@ if sys.platform == 'win32' and sys.maxsize <= 2**32:
   pyarrow_dependency = ['']
 else:
   pyarrow_dependency = [
-      'pyarrow>=6.0.1,<24.0.0',
-      # NOTE(https://github.com/apache/beam/issues/29392): We can remove this
-      # once Beam increases the pyarrow lower bound to a version that fixes CVE.
-      # (lower bound >= 14.0.1)
-      'pyarrow-hotfix<1'
+    # Generally try to cover versions released in the last two years.
+    # Update python/sdks/tox.ini to cover the same pyarrow versions
+    # when updating the bounds here.
+    'pyarrow>=14.0.1,<26.0.0',
   ]
 
 # Exclude pandas<=1.4.2 since it doesn't work with numpy 1.24.x.
@@ -589,17 +588,14 @@ if __name__ == '__main__':
               # tensorflow-transform requires dill, but doesn't set dill as a
               # hard requirement in setup.py.
               'dill',  # match tft extra.
-              'tensorflow_transform>=1.14.0,<1.15.0',
-              # TFT->TFX-BSL require pandas 1.x, which is not compatible
-              # with numpy 2.x
-              'numpy<2',
+              'tensorflow_transform>=1.21.0,<1.22.0',
               # Comment out xgboost as it is breaking presubmit python ml
               # tests due to tag check introduced since pip 24.2
               # https://github.com/apache/beam/issues/31285
               # 'xgboost<2.0',  # https://github.com/apache/beam/issues/31252
               # tft needs protobuf<5; tf2onnx 1.17+ allows protobuf 5 on the
               # ADK-only path.
-              'tf2onnx>=1.16.1,<1.17',
+              'tf2onnx>=1.17.0,<1.18',
           ] + ml_base_core,
           'p310_ml_test': [
             'datatable',
@@ -609,7 +605,7 @@ if __name__ == '__main__':
           ] + ml_base + qdrant_dependency,
           # maintainer: milvus tests only run with this extension. Make sure it
           # is covered by docker-in-docker test when changing py version
-          'p313_ml_test': ml_base + milvus_dependency + qdrant_dependency,
+          'p313_ml_test': ml_base_core + milvus_dependency + qdrant_dependency,
           'aws': ['boto3>=1.9,<2'],
           'azure': [
               'azure-storage-blob>=12.3.2,<13',
@@ -642,7 +638,7 @@ if __name__ == '__main__':
           # https://docs.google.com/document/d/1c84Gc-cZRCfrU8f7kWGsNR2o8oSRjCM-dGHO9KvPWPw/edit?usp=sharing
           'torch': ['torch>=1.9.0,<2.8.0'],
           'tensorflow': [
-              'tensorflow>=2.12rc1,<2.21',  # tensorflow transitive dep
+              'tensorflow>=2.12rc1,<2.22',  # tensorflow transitive dep
               'absl-py>=0.12.0'
           ],
           'transformers': [
@@ -659,10 +655,7 @@ if __name__ == '__main__':
           ],
           'redis': ['redis>=5.0.0,<6'],
           'tft': [
-              'tensorflow_transform>=1.14.0,<1.15.0',
-              # TFT->TFX-BSL require pandas 1.x, which is not compatible
-              # with numpy 2.x
-              'numpy<2',
+              'tensorflow_transform>=1.21.0,<1.22.0',
               # tensorflow-transform requires dill, but doesn't set dill as a
               # hard requirement in setup.py.
               'dill'
@@ -672,7 +665,7 @@ if __name__ == '__main__':
               'onnxruntime==1.13.1',
               'torch==1.13.1',
               'tensorflow==2.11.0',
-              'tf2onnx==1.13.0',
+              'tf2onnx==1.17.0',
               'skl2onnx==1.13',
               'transformers==4.25.1',  # tensorflow transient dep
               'absl-py>=0.12.0'
diff --git a/sdks/python/tox.ini b/sdks/python/tox.ini
index 6dab85083a0..245511e952d 100644
--- a/sdks/python/tox.ini
+++ b/sdks/python/tox.ini
@@ -335,16 +335,9 @@ extras = test
 commands =
   bash {toxinidir}/scripts/pytest_validates_runner.sh {envname} {toxinidir}/apache_beam/runners/portability/prism_runner_test.py {posargs}
 
-[testenv:py{310,311}-pyarrow-{6,15,16,17,18,19,20,21,22,23}]
+[testenv:py{310,311}-pyarrow-{17,18,19,20,21,22,23,24,25}]
 deps =
-  # As a courtesy to users, test against the oldest allowed version of Pyarrow.
-  # We'd have to increase the pyarrow lower bound when Python 3.9 is deprecated.
-  # Since Pandas 2 requires pyarrow>=7, downgrade pandas for this test.
-  6: pyarrow>=6,<7
-  6: pandas<2
   # Test against versions of pyarrow released in last ~2 years.
-  15: pyarrow>=15,<16
-  16: pyarrow>=16,<17
   17: pyarrow>=17,<18
   18: pyarrow>=18,<19
   19: pyarrow>=19,<20
@@ -352,6 +345,8 @@ deps =
   21: pyarrow>=21,<22
   22: pyarrow>=22,<23
   23: pyarrow>=23,<24
+  24: pyarrow>=24,<25
+  25: pyarrow>=25,<26
   numpy==1.26.4
 commands =
   # Log pyarrow and numpy version for debugging