This is an automated email from the ASF dual-hosted git repository.
derrickaw 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 b9a783ad249 Set firm upper bound on Python 3.11 numpy (#40823)
b9a783ad249 is described below
commit b9a783ad24909fbb5e49e8d6e76740812b8aa12c
Author: Jack McCluskey <[email protected]>
AuthorDate: Mon Oct 26 17:14:21 2026 -0400
Set firm upper bound on Python 3.11 numpy (#40823)
* Set firm upper bound on Python 3.11 numpy
* fix quotes in pyproject.toml
* fix quotes further
---
sdks/python/pyproject.toml | 3 ++-
sdks/python/setup.py | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/sdks/python/pyproject.toml b/sdks/python/pyproject.toml
index 9a00fe03ea0..b3fe73f4697 100644
--- a/sdks/python/pyproject.toml
+++ b/sdks/python/pyproject.toml
@@ -31,7 +31,8 @@ requires = [
# Avoid https://github.com/pypa/virtualenv/issues/2006
"distlib==0.4.4",
# Numpy headers
- "numpy>=1.23.2,<2.6.0", # Update setup.py as well.
+ "numpy>=1.23.2,<2.6.0; python_version >= '3.12'", # Update setup.py as
well.
+ "numpy>=1.23.2,<2.5.0; python_version < '3.12'",
# having cython here will create wheels that are platform dependent.
"cython>=3.2.6,<4",
## deps for generating external transform wrappers:
diff --git a/sdks/python/setup.py b/sdks/python/setup.py
index 8236944aea1..98d5b631f13 100644
--- a/sdks/python/setup.py
+++ b/sdks/python/setup.py
@@ -446,7 +446,8 @@ if __name__ == '__main__':
# Use a strict upper bound.
# Increment the lower bound when the minimum Python version is
# updated.
- 'numpy>=1.23.2,<2.6.0', # Update pyproject.toml as well.
+ 'numpy>=1.23.2,<2.6.0; python_version >= "3.12"', # Update
pyproject.toml as well.
+ 'numpy>=1.23.2,<2.5.0; python_version < "3.12"',
'objsize>=0.6.1,<0.8.0',
'packaging>=22.0',
'pillow>=12.1.1,<14',