From 1bd18f96843d5e99c5a76ce0ae9cc9a29025def7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Wed, 1 Apr 2026 12:39:49 +0200 Subject: [PATCH 1/5] GH-49638: [CI][Packaging][Python] Pin setuptools < 80 to build oldest pandas to test on musllinux --- ci/docker/python-wheel-musllinux-test.dockerfile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ci/docker/python-wheel-musllinux-test.dockerfile b/ci/docker/python-wheel-musllinux-test.dockerfile index 601ef886bcff..38120baf0e65 100644 --- a/ci/docker/python-wheel-musllinux-test.dockerfile +++ b/ci/docker/python-wheel-musllinux-test.dockerfile @@ -32,6 +32,12 @@ RUN cp /usr/share/zoneinfo/Etc/UTC /etc/localtime # pandas doesn't provide wheel for aarch64 yet, so cache the compiled # test dependencies in a docker image COPY python/requirements-wheel-test.txt /arrow/python/ +# Pandas 2.0.3 is the last version to support numpy 1.21.x which is +# the lowest version we support for Python 3.10. +# Pandas 2.0.3 doesn't have wheels for Python 3.10 so we need to build from source, +# which requires setuptools < 80. +RUN if [ "${python_image_tag}" = "3.10" ]; then pip install 'setuptools<80'; \ + fi RUN pip install -r /arrow/python/requirements-wheel-test.txt # Install the GCS testbench with the system Python From b63eefeb28db4dadc552150e7690b5d5af9acedf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Wed, 1 Apr 2026 14:53:04 +0200 Subject: [PATCH 2/5] Re-define ARG python_image_tag as is not maintained --- ci/docker/python-wheel-musllinux-test.dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ci/docker/python-wheel-musllinux-test.dockerfile b/ci/docker/python-wheel-musllinux-test.dockerfile index 38120baf0e65..087f6ac86532 100644 --- a/ci/docker/python-wheel-musllinux-test.dockerfile +++ b/ci/docker/python-wheel-musllinux-test.dockerfile @@ -19,6 +19,10 @@ ARG alpine_linux ARG python_image_tag FROM python:${python_image_tag}-alpine${alpine_linux} +# Re-define python_image_tag argument to be used in the next stage. +# This is needed because the argument is not preserved after the FROM statement. +ARG python_image_tag + RUN apk add --no-cache \ bash \ g++ \ From b2a5354ae6f13bf107a5654fd33b5387b6ac8057 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Wed, 1 Apr 2026 17:47:49 +0200 Subject: [PATCH 3/5] Try setting up PIP_CONSTRAINT --- ci/docker/python-wheel-musllinux-test.dockerfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ci/docker/python-wheel-musllinux-test.dockerfile b/ci/docker/python-wheel-musllinux-test.dockerfile index 087f6ac86532..c1f30a8ccb18 100644 --- a/ci/docker/python-wheel-musllinux-test.dockerfile +++ b/ci/docker/python-wheel-musllinux-test.dockerfile @@ -40,9 +40,13 @@ COPY python/requirements-wheel-test.txt /arrow/python/ # the lowest version we support for Python 3.10. # Pandas 2.0.3 doesn't have wheels for Python 3.10 so we need to build from source, # which requires setuptools < 80. -RUN if [ "${python_image_tag}" = "3.10" ]; then pip install 'setuptools<80'; \ +RUN if [ "${python_image_tag}" = "3.10" ]; then \ + echo 'setuptools<80' > /tmp/setuptools-constraint.txt; \ + PIP_CONSTRAINT=/tmp/setuptools-constraint.txt \ + pip install -r /arrow/python/requirements-wheel-test.txt; \ + else \ + pip install -r /arrow/python/requirements-wheel-test.txt; \ fi -RUN pip install -r /arrow/python/requirements-wheel-test.txt # Install the GCS testbench with the system Python COPY ci/scripts/install_gcs_testbench.sh /arrow/ci/scripts/ From 9dc44cf276f1bf6696a118139b20bc8c6810d954 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Thu, 2 Apr 2026 11:36:22 +0200 Subject: [PATCH 4/5] Update ci/docker/python-wheel-musllinux-test.dockerfile Co-authored-by: Sutou Kouhei --- ci/docker/python-wheel-musllinux-test.dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/docker/python-wheel-musllinux-test.dockerfile b/ci/docker/python-wheel-musllinux-test.dockerfile index c1f30a8ccb18..7ae998c2293a 100644 --- a/ci/docker/python-wheel-musllinux-test.dockerfile +++ b/ci/docker/python-wheel-musllinux-test.dockerfile @@ -43,7 +43,7 @@ COPY python/requirements-wheel-test.txt /arrow/python/ RUN if [ "${python_image_tag}" = "3.10" ]; then \ echo 'setuptools<80' > /tmp/setuptools-constraint.txt; \ PIP_CONSTRAINT=/tmp/setuptools-constraint.txt \ - pip install -r /arrow/python/requirements-wheel-test.txt; \ + pip install -r /arrow/python/requirements-wheel-test.txt; \ else \ pip install -r /arrow/python/requirements-wheel-test.txt; \ fi From 306c40ea60211d56ef3bf30120fc3c8e5cb7e22a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Thu, 2 Apr 2026 11:39:25 +0200 Subject: [PATCH 5/5] Add note about bumping when dropping numpy 1.x support on when dropping Python 3.10 --- ci/docker/python-wheel-musllinux-test.dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/docker/python-wheel-musllinux-test.dockerfile b/ci/docker/python-wheel-musllinux-test.dockerfile index 7ae998c2293a..03473a9a347f 100644 --- a/ci/docker/python-wheel-musllinux-test.dockerfile +++ b/ci/docker/python-wheel-musllinux-test.dockerfile @@ -40,6 +40,7 @@ COPY python/requirements-wheel-test.txt /arrow/python/ # the lowest version we support for Python 3.10. # Pandas 2.0.3 doesn't have wheels for Python 3.10 so we need to build from source, # which requires setuptools < 80. +# Drop when bumping numpy from 1.21.x (GH-48473) or when dropping Python 3.10. RUN if [ "${python_image_tag}" = "3.10" ]; then \ echo 'setuptools<80' > /tmp/setuptools-constraint.txt; \ PIP_CONSTRAINT=/tmp/setuptools-constraint.txt \