Skip to content

Commit

Permalink
Set minimum dependencies for apache-beam on Py 3.12+3.13 (apache#46321)
Browse files Browse the repository at this point in the history
Older versions of apache-beam package depend upon gprcio-tools, but the
version requirement they specify doesn't work on Py 3.12, but the metadata
doesn't say that, so it tries to compile it and fails.

This updates the min version to the min supported version with wheels for 3.12
  • Loading branch information
ashb authored and davidblain-infrabel committed Feb 3, 2025
1 parent 76749fd commit 9bd468d
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
3 changes: 2 additions & 1 deletion generated/provider_dependencies.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@
"apache.beam": {
"deps": [
"apache-airflow>=2.9.0",
"apache-beam>=2.53.0",
"apache-beam>=2.53.0; python_version < \"3.12\"",
"apache-beam>=2.57.0; python_version >= \"3.12\"",
"numpy>=1.26.0",
"pyarrow>=14.0.1"
],
Expand Down
9 changes: 5 additions & 4 deletions providers/apache/beam/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,15 @@ The package supports the following python versions: 3.9,3.10,3.11,3.12
Requirements
------------

================== ==================
================== ======================================
PIP package Version required
================== ==================
================== ======================================
``apache-airflow`` ``>=2.9.0``
``apache-beam`` ``>=2.53.0``
``apache-beam`` ``>=2.53.0; python_version < "3.12"``
``apache-beam`` ``>=2.57.0; python_version >= "3.12"``
``pyarrow`` ``>=14.0.1``
``numpy`` ``>=1.26.0``
================== ==================
================== ======================================

Cross provider package dependencies
-----------------------------------
Expand Down
4 changes: 3 additions & 1 deletion providers/apache/beam/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,11 @@ requires-python = "~=3.9"
dependencies = [
"apache-airflow>=2.9.0",
# Apache Beam > 2.53.0 and pyarrow > 14.0.1 fix https://nvd.nist.gov/vuln/detail/CVE-2023-47248.
"apache-beam>=2.53.0",
'apache-beam>=2.53.0; python_version < "3.12"',
'apache-beam>=2.57.0; python_version >= "3.12"',
"pyarrow>=14.0.1",
"numpy>=1.26.0",

]

# The optional dependencies should be modified in place in the generated file
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,13 @@ def get_provider_info():
"python-modules": ["airflow.providers.apache.beam.triggers.beam"],
}
],
"dependencies": ["apache-airflow>=2.9.0", "apache-beam>=2.53.0", "pyarrow>=14.0.1", "numpy>=1.26.0"],
"dependencies": [
"apache-airflow>=2.9.0",
'apache-beam>=2.53.0; python_version < "3.12"',
'apache-beam>=2.57.0; python_version >= "3.12"',
"pyarrow>=14.0.1",
"numpy>=1.26.0",
],
"optional-dependencies": {
"google": ["apache-beam[gcp]"],
"common.compat": ["apache-airflow-providers-common-compat"],
Expand Down

0 comments on commit 9bd468d

Please sign in to comment.