From ed4e9d166deb0fbd4c034b090506d83357ff6ab7 Mon Sep 17 00:00:00 2001 From: Lysandros Nikolaou Date: Fri, 2 Aug 2024 16:12:46 +0000 Subject: [PATCH 01/29] Set up CI for Python 3.13 --- .../python-wheel-windows-test-vs2019.dockerfile | 5 +++-- ci/docker/python-wheel-windows-vs2019.dockerfile | 5 +++-- ci/scripts/install_python.sh | 7 ++++--- dev/release/verify-release-candidate.sh | 6 +++--- dev/tasks/tasks.yml | 5 +++-- python/pyproject.toml | 1 + python/requirements-wheel-test.txt | 14 +++++++------- 7 files changed, 24 insertions(+), 19 deletions(-) diff --git a/ci/docker/python-wheel-windows-test-vs2019.dockerfile b/ci/docker/python-wheel-windows-test-vs2019.dockerfile index 32bbb55e82689..bb090aeb18b7a 100644 --- a/ci/docker/python-wheel-windows-test-vs2019.dockerfile +++ b/ci/docker/python-wheel-windows-test-vs2019.dockerfile @@ -40,8 +40,9 @@ ARG python=3.8 RUN (if "%python%"=="3.8" setx PYTHON_VERSION "3.8.10" && setx PATH "%PATH%;C:\Python38;C:\Python38\Scripts") & \ (if "%python%"=="3.9" setx PYTHON_VERSION "3.9.13" && setx PATH "%PATH%;C:\Python39;C:\Python39\Scripts") & \ (if "%python%"=="3.10" setx PYTHON_VERSION "3.10.11" && setx PATH "%PATH%;C:\Python310;C:\Python310\Scripts") & \ - (if "%python%"=="3.11" setx PYTHON_VERSION "3.11.5" && setx PATH "%PATH%;C:\Python311;C:\Python311\Scripts") & \ - (if "%python%"=="3.12" setx PYTHON_VERSION "3.12.0" && setx PATH "%PATH%;C:\Python312;C:\Python312\Scripts") + (if "%python%"=="3.11" setx PYTHON_VERSION "3.11.9" && setx PATH "%PATH%;C:\Python311;C:\Python311\Scripts") & \ + (if "%python%"=="3.12" setx PYTHON_VERSION "3.12.4" && setx PATH "%PATH%;C:\Python312;C:\Python312\Scripts") & \ + (if "%python%"=="3.13" setx PYTHON_VERSION "3.13.0-rc1" && setx PATH "%PATH%;C:\Python313;C:\Python313\Scripts") # Install archiver to extract xz archives RUN choco install -r -y --no-progress python --version=%PYTHON_VERSION% & \ diff --git a/ci/docker/python-wheel-windows-vs2019.dockerfile b/ci/docker/python-wheel-windows-vs2019.dockerfile index ff42de939d91f..7363943869ab6 100644 --- a/ci/docker/python-wheel-windows-vs2019.dockerfile +++ b/ci/docker/python-wheel-windows-vs2019.dockerfile @@ -83,8 +83,9 @@ ARG python=3.8 RUN (if "%python%"=="3.8" setx PYTHON_VERSION "3.8.10" && setx PATH "%PATH%;C:\Python38;C:\Python38\Scripts") & \ (if "%python%"=="3.9" setx PYTHON_VERSION "3.9.13" && setx PATH "%PATH%;C:\Python39;C:\Python39\Scripts") & \ (if "%python%"=="3.10" setx PYTHON_VERSION "3.10.11" && setx PATH "%PATH%;C:\Python310;C:\Python310\Scripts") & \ - (if "%python%"=="3.11" setx PYTHON_VERSION "3.11.5" && setx PATH "%PATH%;C:\Python311;C:\Python311\Scripts") & \ - (if "%python%"=="3.12" setx PYTHON_VERSION "3.12.0" && setx PATH "%PATH%;C:\Python312;C:\Python312\Scripts") + (if "%python%"=="3.11" setx PYTHON_VERSION "3.11.9" && setx PATH "%PATH%;C:\Python311;C:\Python311\Scripts") & \ + (if "%python%"=="3.12" setx PYTHON_VERSION "3.12.4" && setx PATH "%PATH%;C:\Python312;C:\Python312\Scripts") & \ + (if "%python%"=="3.13" setx PYTHON_VERSION "3.13.0-rc1" && setx PATH "%PATH%;C:\Python313;C:\Python313\Scripts") RUN choco install -r -y --no-progress python --version=%PYTHON_VERSION% RUN python -m pip install -U pip setuptools diff --git a/ci/scripts/install_python.sh b/ci/scripts/install_python.sh index 5f962f02b911b..cb5efdea1be9f 100755 --- a/ci/scripts/install_python.sh +++ b/ci/scripts/install_python.sh @@ -28,8 +28,9 @@ declare -A versions versions=([3.8]=3.8.10 [3.9]=3.9.13 [3.10]=3.10.11 - [3.11]=3.11.5 - [3.12]=3.12.0) + [3.11]=3.11.9 + [3.12]=3.12.4 + [3.13]=3.13.0rc1) if [ "$#" -ne 2 ]; then echo "Usage: $0 " @@ -46,7 +47,7 @@ full_version=${versions[$2]} if [ $platform = "macOS" ]; then echo "Downloading Python installer..." - if [ "$(uname -m)" = "arm64" ] || [ "$version" = "3.10" ] || [ "$version" = "3.11" ] || [ "$version" = "3.12" ]; then + if [ "$(uname -m)" = "arm64" ] || [ "$version" = "3.10" ] || [ "$version" = "3.11" ] || [ "$version" = "3.12" ] || [ "$version" = "3.13" ]; then fname="python-${full_version}-macos11.pkg" else fname="python-${full_version}-macosx10.9.pkg" diff --git a/dev/release/verify-release-candidate.sh b/dev/release/verify-release-candidate.sh index 6a36109dc2fc1..07e765a759ea0 100755 --- a/dev/release/verify-release-candidate.sh +++ b/dev/release/verify-release-candidate.sh @@ -1146,7 +1146,7 @@ test_linux_wheels() { local arch="x86_64" fi - local python_versions="${TEST_PYTHON_VERSIONS:-3.8 3.9 3.10 3.11 3.12}" + local python_versions="${TEST_PYTHON_VERSIONS:-3.8 3.9 3.10 3.11 3.12 3.13}" local platform_tags="${TEST_WHEEL_PLATFORM_TAGS:-manylinux_2_17_${arch}.manylinux2014_${arch} manylinux_2_28_${arch}}" for python in ${python_versions}; do @@ -1170,11 +1170,11 @@ test_macos_wheels() { # apple silicon processor if [ "$(uname -m)" = "arm64" ]; then - local python_versions="3.8 3.9 3.10 3.11 3.12" + local python_versions="3.8 3.9 3.10 3.11 3.12 3.13" local platform_tags="macosx_11_0_arm64" local check_flight=OFF else - local python_versions="3.8 3.9 3.10 3.11 3.12" + local python_versions="3.8 3.9 3.10 3.11 3.12 3.13" local platform_tags="macosx_10_15_x86_64" fi diff --git a/dev/tasks/tasks.yml b/dev/tasks/tasks.yml index 94eac92a5be0b..4a69b77cdd201 100644 --- a/dev/tasks/tasks.yml +++ b/dev/tasks/tasks.yml @@ -387,7 +387,8 @@ tasks: ("3.9", "cp39", "cp39"), ("3.10", "cp310", "cp310"), ("3.11", "cp311", "cp311"), - ("3.12", "cp312", "cp312")] %} + ("3.12", "cp312", "cp312"), + ("3.13", "cp313", "cp313")] %} {############################## Wheel Linux ##################################} @@ -1191,7 +1192,7 @@ tasks: UBUNTU: 22.04 image: ubuntu-cpp-emscripten -{% for python_version in ["3.8", "3.9", "3.10", "3.11", "3.12"] %} +{% for python_version in ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] %} test-conda-python-{{ python_version }}: ci: github template: docker-tests/github.linux.yml diff --git a/python/pyproject.toml b/python/pyproject.toml index d863bb3e5f0ac..8ece65dd467bb 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -48,6 +48,7 @@ classifiers = [ 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3.12', + 'Programming Language :: Python :: 3.13', ] maintainers = [ {name = "Apache Arrow Developers", email = "dev@arrow.apache.org"} diff --git a/python/requirements-wheel-test.txt b/python/requirements-wheel-test.txt index 46bedc13ba1a7..41c56568e9ef3 100644 --- a/python/requirements-wheel-test.txt +++ b/python/requirements-wheel-test.txt @@ -5,16 +5,16 @@ pytest pytz tzdata; sys_platform == 'win32' -numpy==1.21.3; platform_system == "Linux" and platform_machine == "aarch64" and python_version < "3.11" -numpy==1.23.4; python_version == "3.11" -numpy==1.26.0; python_version >= "3.12" +numpy==1.21.6; platform_system == "Linux" and platform_machine == "aarch64" and python_version < "3.11" +numpy==1.23.5; python_version == "3.11" +numpy==1.26.4; python_version >= "3.12" numpy==1.19.5; platform_system == "Linux" and platform_machine != "aarch64" and python_version < "3.9" -numpy==1.21.3; platform_system == "Linux" and platform_machine != "aarch64" and python_version >= "3.9" and python_version < "3.11" -numpy==1.21.3; platform_system == "Darwin" and platform_machine == "arm64" and python_version < "3.11" +numpy==1.21.6; platform_system == "Linux" and platform_machine != "aarch64" and python_version >= "3.9" and python_version < "3.11" +numpy==1.21.6; platform_system == "Darwin" and platform_machine == "arm64" and python_version < "3.11" numpy==1.19.5; platform_system == "Darwin" and platform_machine != "arm64" and python_version < "3.9" -numpy==1.21.3; platform_system == "Darwin" and platform_machine != "arm64" and python_version >= "3.9" and python_version < "3.11" +numpy==1.21.6; platform_system == "Darwin" and platform_machine != "arm64" and python_version >= "3.9" and python_version < "3.11" numpy==1.19.5; platform_system == "Windows" and python_version < "3.9" -numpy==1.21.3; platform_system == "Windows" and python_version >= "3.9" and python_version < "3.11" +numpy==1.21.6; platform_system == "Windows" and python_version >= "3.9" and python_version < "3.11" pandas<1.1.0; platform_system == "Linux" and platform_machine != "aarch64" and python_version < "3.8" pandas; platform_system == "Linux" and platform_machine != "aarch64" and python_version >= "3.8" From 58617a6b218e4dd43263a3c9f0f015909ca2db05 Mon Sep 17 00:00:00 2001 From: Lysandros Nikolaou Date: Mon, 5 Aug 2024 14:51:37 +0000 Subject: [PATCH 02/29] Address feedback --- dev/tasks/tasks.yml | 2 +- docker-compose.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dev/tasks/tasks.yml b/dev/tasks/tasks.yml index 4a69b77cdd201..b7bbd6edf066c 100644 --- a/dev/tasks/tasks.yml +++ b/dev/tasks/tasks.yml @@ -1192,7 +1192,7 @@ tasks: UBUNTU: 22.04 image: ubuntu-cpp-emscripten -{% for python_version in ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] %} +{% for python_version in ["3.8", "3.9", "3.10", "3.11", "3.12"] %} test-conda-python-{{ python_version }}: ci: github template: docker-tests/github.linux.yml diff --git a/docker-compose.yml b/docker-compose.yml index cf22324f7cfb4..72d11b009066e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1095,7 +1095,7 @@ services: args: arch: ${ARCH} arch_short: ${ARCH_SHORT} - base: quay.io/pypa/manylinux2014_${ARCH_ALIAS}:2024-02-04-ea37246 + base: quay.io/pypa/manylinux2014_${ARCH_ALIAS}:2024-08-03-32dfa47 vcpkg: ${VCPKG} python: ${PYTHON} manylinux: 2014 @@ -1118,7 +1118,7 @@ services: args: arch: ${ARCH} arch_short: ${ARCH_SHORT} - base: quay.io/pypa/manylinux_2_28_${ARCH_ALIAS}:2024-02-04-ea37246 + base: quay.io/pypa/manylinux_2_28_${ARCH_ALIAS}:2024-08-03-32dfa47 vcpkg: ${VCPKG} python: ${PYTHON} manylinux: 2_28 From cca8c654d4776869b4747bcf294ea40dc377c254 Mon Sep 17 00:00:00 2001 From: Lysandros Nikolaou Date: Tue, 6 Aug 2024 11:03:03 +0000 Subject: [PATCH 03/29] Update env --- .env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env b/.env index 1358aafe824a6..21f904c3208f6 100644 --- a/.env +++ b/.env @@ -95,7 +95,7 @@ VCPKG="943c5ef1c8f6b5e6ced092b242c8299caae2ff01" # 2024.04.26 Release # ci/docker/python-wheel-windows-vs2019.dockerfile. # This is a workaround for our CI problem that "archery docker build" doesn't # use pulled built images in dev/tasks/python-wheels/github.windows.yml. -PYTHON_WHEEL_WINDOWS_IMAGE_REVISION=2024-06-18 +PYTHON_WHEEL_WINDOWS_IMAGE_REVISION=2024-08-06 # Use conanio/${CONAN_BASE}:{CONAN_VERSION} for "docker-compose run --rm conan". # See https://github.com/conan-io/conan-docker-tools#readme and From b6cabf0a6486de2c0e563d22903198dc043172fa Mon Sep 17 00:00:00 2001 From: Lysandros Nikolaou Date: Tue, 6 Aug 2024 13:02:40 +0000 Subject: [PATCH 04/29] Handle two cp313-cp313* directories in /opt/python in manylinux --- ci/docker/python-wheel-manylinux.dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ci/docker/python-wheel-manylinux.dockerfile b/ci/docker/python-wheel-manylinux.dockerfile index cb39667af1e10..35e4ff0937de4 100644 --- a/ci/docker/python-wheel-manylinux.dockerfile +++ b/ci/docker/python-wheel-manylinux.dockerfile @@ -103,7 +103,11 @@ RUN vcpkg install \ # Configure Python for applications running in the bash shell of this Dockerfile ARG python=3.8 ENV PYTHON_VERSION=${python} -RUN PYTHON_ROOT=$(find /opt/python -name cp${PYTHON_VERSION/./}-*) && \ +RUN if [[ ${PYTHON_VERSION} == "3.6" || ${PYTHON_VERSION} == "3.7" ]]; then \ + PYTHON_ROOT=$(find /opt/python -name cp${PYTHON_VERSION/./}-cp${PYTHON_VERSION/./}m); \ + else \ + PYTHON_ROOT=$(find /opt/python -name cp${PYTHON_VERSION/./}-cp${PYTHON_VERSION/./}); \ + fi && \ echo "export PATH=$PYTHON_ROOT/bin:\$PATH" >> /etc/profile.d/python.sh SHELL ["/bin/bash", "-i", "-c"] From b5d172bca6c6c03eb78615018790f73a72814e34 Mon Sep 17 00:00:00 2001 From: Lysandros Nikolaou Date: Wed, 7 Aug 2024 13:25:48 +0000 Subject: [PATCH 05/29] Fix build issues --- ci/docker/python-wheel-windows-test-vs2019.dockerfile | 2 +- ci/docker/python-wheel-windows-vs2019.dockerfile | 2 +- dev/tasks/python-wheels/github.linux.yml | 5 +++++ docker-compose.yml | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ci/docker/python-wheel-windows-test-vs2019.dockerfile b/ci/docker/python-wheel-windows-test-vs2019.dockerfile index bb090aeb18b7a..5f488a4c285ff 100644 --- a/ci/docker/python-wheel-windows-test-vs2019.dockerfile +++ b/ci/docker/python-wheel-windows-test-vs2019.dockerfile @@ -45,6 +45,6 @@ RUN (if "%python%"=="3.8" setx PYTHON_VERSION "3.8.10" && setx PATH "%PATH%;C:\P (if "%python%"=="3.13" setx PYTHON_VERSION "3.13.0-rc1" && setx PATH "%PATH%;C:\Python313;C:\Python313\Scripts") # Install archiver to extract xz archives -RUN choco install -r -y --no-progress python --version=%PYTHON_VERSION% & \ +RUN choco install -r -y --pre --no-progress python --version=%PYTHON_VERSION% & \ python -m pip install --no-cache-dir -U pip setuptools & \ choco install --no-progress -r -y archiver diff --git a/ci/docker/python-wheel-windows-vs2019.dockerfile b/ci/docker/python-wheel-windows-vs2019.dockerfile index 7363943869ab6..5a17e3e4c52c2 100644 --- a/ci/docker/python-wheel-windows-vs2019.dockerfile +++ b/ci/docker/python-wheel-windows-vs2019.dockerfile @@ -86,7 +86,7 @@ RUN (if "%python%"=="3.8" setx PYTHON_VERSION "3.8.10" && setx PATH "%PATH%;C:\P (if "%python%"=="3.11" setx PYTHON_VERSION "3.11.9" && setx PATH "%PATH%;C:\Python311;C:\Python311\Scripts") & \ (if "%python%"=="3.12" setx PYTHON_VERSION "3.12.4" && setx PATH "%PATH%;C:\Python312;C:\Python312\Scripts") & \ (if "%python%"=="3.13" setx PYTHON_VERSION "3.13.0-rc1" && setx PATH "%PATH%;C:\Python313;C:\Python313\Scripts") -RUN choco install -r -y --no-progress python --version=%PYTHON_VERSION% +RUN choco install -r -y --pre --no-progress python --version=%PYTHON_VERSION% RUN python -m pip install -U pip setuptools COPY python/requirements-wheel-build.txt arrow/python/ diff --git a/dev/tasks/python-wheels/github.linux.yml b/dev/tasks/python-wheels/github.linux.yml index 5c82bf74b30b7..dc00500bd7dd7 100644 --- a/dev/tasks/python-wheels/github.linux.yml +++ b/dev/tasks/python-wheels/github.linux.yml @@ -37,6 +37,11 @@ jobs: ARCHERY_USE_DOCKER_CLI: 0 {% endif %} PYTHON: "{{ python_version }}" + {% if python_version == "3.13" %} + PYTHON_IMAGE_TAG: "3.13-rc"" + {% else %} + PYTHON_IMAGE_TAG: "{{ python_version }}" + {% endif %} steps: {{ macros.github_checkout_arrow()|indent }} diff --git a/docker-compose.yml b/docker-compose.yml index 72d11b009066e..03b5fc59b69ff 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1134,7 +1134,7 @@ services: command: /arrow/ci/scripts/python_wheel_manylinux_build.sh python-wheel-manylinux-test-imports: - image: ${ARCH}/python:${PYTHON} + image: ${ARCH}/python:${PYTHON_IMAGE_TAG} shm_size: 2G volumes: - .:/arrow:delegated From 704078819080761fe2809277819f21d9560500fb Mon Sep 17 00:00:00 2001 From: Lysandros Nikolaou Date: Wed, 7 Aug 2024 17:28:07 +0200 Subject: [PATCH 06/29] Update dev/tasks/python-wheels/github.linux.yml Co-authored-by: Joris Van den Bossche --- dev/tasks/python-wheels/github.linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/tasks/python-wheels/github.linux.yml b/dev/tasks/python-wheels/github.linux.yml index dc00500bd7dd7..0fd1f04a9a3ff 100644 --- a/dev/tasks/python-wheels/github.linux.yml +++ b/dev/tasks/python-wheels/github.linux.yml @@ -38,7 +38,7 @@ jobs: {% endif %} PYTHON: "{{ python_version }}" {% if python_version == "3.13" %} - PYTHON_IMAGE_TAG: "3.13-rc"" + PYTHON_IMAGE_TAG: "3.13-rc" {% else %} PYTHON_IMAGE_TAG: "{{ python_version }}" {% endif %} From 1d0335462093ed0cf103b42cb15f67571dead37c Mon Sep 17 00:00:00 2001 From: Lysandros Nikolaou Date: Wed, 7 Aug 2024 15:56:11 +0000 Subject: [PATCH 07/29] Address feedback; remove 3.6-7 checks and wrap long bash line --- ci/docker/python-wheel-manylinux.dockerfile | 6 +----- ci/scripts/install_python.sh | 7 ++++++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ci/docker/python-wheel-manylinux.dockerfile b/ci/docker/python-wheel-manylinux.dockerfile index 35e4ff0937de4..fc8f8ffdd51d6 100644 --- a/ci/docker/python-wheel-manylinux.dockerfile +++ b/ci/docker/python-wheel-manylinux.dockerfile @@ -103,11 +103,7 @@ RUN vcpkg install \ # Configure Python for applications running in the bash shell of this Dockerfile ARG python=3.8 ENV PYTHON_VERSION=${python} -RUN if [[ ${PYTHON_VERSION} == "3.6" || ${PYTHON_VERSION} == "3.7" ]]; then \ - PYTHON_ROOT=$(find /opt/python -name cp${PYTHON_VERSION/./}-cp${PYTHON_VERSION/./}m); \ - else \ - PYTHON_ROOT=$(find /opt/python -name cp${PYTHON_VERSION/./}-cp${PYTHON_VERSION/./}); \ - fi && \ +RUN PYTHON_ROOT=$(find /opt/python -name cp${PYTHON_VERSION/./}-cp${PYTHON_VERSION/./}); && \ echo "export PATH=$PYTHON_ROOT/bin:\$PATH" >> /etc/profile.d/python.sh SHELL ["/bin/bash", "-i", "-c"] diff --git a/ci/scripts/install_python.sh b/ci/scripts/install_python.sh index cb5efdea1be9f..9eddd92756643 100755 --- a/ci/scripts/install_python.sh +++ b/ci/scripts/install_python.sh @@ -47,7 +47,12 @@ full_version=${versions[$2]} if [ $platform = "macOS" ]; then echo "Downloading Python installer..." - if [ "$(uname -m)" = "arm64" ] || [ "$version" = "3.10" ] || [ "$version" = "3.11" ] || [ "$version" = "3.12" ] || [ "$version" = "3.13" ]; then + if [ "$(uname -m)" = "arm64" ] || \ + [ "$version" = "3.10" ] || \ + [ "$version" = "3.11" ] || \ + [ "$version" = "3.12" ] || \ + [ "$version" = "3.13" ]; + then fname="python-${full_version}-macos11.pkg" else fname="python-${full_version}-macosx10.9.pkg" From 511f31d435b70ec3186ef44126845f0fee763669 Mon Sep 17 00:00:00 2001 From: Lysandros Nikolaou Date: Wed, 7 Aug 2024 16:58:22 +0000 Subject: [PATCH 08/29] Remove wrong semicolon --- ci/docker/python-wheel-manylinux.dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/docker/python-wheel-manylinux.dockerfile b/ci/docker/python-wheel-manylinux.dockerfile index fc8f8ffdd51d6..42f088fd8a22a 100644 --- a/ci/docker/python-wheel-manylinux.dockerfile +++ b/ci/docker/python-wheel-manylinux.dockerfile @@ -103,7 +103,7 @@ RUN vcpkg install \ # Configure Python for applications running in the bash shell of this Dockerfile ARG python=3.8 ENV PYTHON_VERSION=${python} -RUN PYTHON_ROOT=$(find /opt/python -name cp${PYTHON_VERSION/./}-cp${PYTHON_VERSION/./}); && \ +RUN PYTHON_ROOT=$(find /opt/python -name cp${PYTHON_VERSION/./}-cp${PYTHON_VERSION/./}) && \ echo "export PATH=$PYTHON_ROOT/bin:\$PATH" >> /etc/profile.d/python.sh SHELL ["/bin/bash", "-i", "-c"] From 7685c96249d018f6650f385725b6e0a725577d66 Mon Sep 17 00:00:00 2001 From: Lysandros Nikolaou Date: Thu, 8 Aug 2024 11:46:45 +0000 Subject: [PATCH 09/29] Address feedback; use python_image_tag and install numpy nightly --- ci/docker/python-wheel-manylinux-test.dockerfile | 2 +- ci/docker/python-wheel-manylinux.dockerfile | 2 +- ci/docker/python-wheel-windows-vs2019.dockerfile | 3 ++- ci/scripts/python_wheel_macos_build.sh | 4 +++- docker-compose.yml | 3 +++ 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ci/docker/python-wheel-manylinux-test.dockerfile b/ci/docker/python-wheel-manylinux-test.dockerfile index cdd0ae3ced756..e61ab8d5c7d31 100644 --- a/ci/docker/python-wheel-manylinux-test.dockerfile +++ b/ci/docker/python-wheel-manylinux-test.dockerfile @@ -17,7 +17,7 @@ ARG arch ARG python -FROM ${arch}/python:${python} +FROM ${arch}/python:${python_image_tag} # RUN pip install --upgrade pip diff --git a/ci/docker/python-wheel-manylinux.dockerfile b/ci/docker/python-wheel-manylinux.dockerfile index 42f088fd8a22a..ae488a8cfdb90 100644 --- a/ci/docker/python-wheel-manylinux.dockerfile +++ b/ci/docker/python-wheel-manylinux.dockerfile @@ -110,4 +110,4 @@ SHELL ["/bin/bash", "-i", "-c"] ENTRYPOINT ["/bin/bash", "-i", "-c"] COPY python/requirements-wheel-build.txt /arrow/python/ -RUN pip install -r /arrow/python/requirements-wheel-build.txt +RUN pip install -r /arrow/python/requirements-wheel-build.txt --pre --extra-index-url "https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" diff --git a/ci/docker/python-wheel-windows-vs2019.dockerfile b/ci/docker/python-wheel-windows-vs2019.dockerfile index 5a17e3e4c52c2..632b248714cf5 100644 --- a/ci/docker/python-wheel-windows-vs2019.dockerfile +++ b/ci/docker/python-wheel-windows-vs2019.dockerfile @@ -90,7 +90,8 @@ RUN choco install -r -y --pre --no-progress python --version=%PYTHON_VERSION% RUN python -m pip install -U pip setuptools COPY python/requirements-wheel-build.txt arrow/python/ -RUN python -m pip install -r arrow/python/requirements-wheel-build.txt +# TODO: Remove --pre and the extra index after NumPy release for 3.13 on PyPI +RUN python -m pip install -r arrow/python/requirements-wheel-build.txt --pre --extra-index-url "https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" # ENV CLCACHE_DIR="C:\clcache" # ENV CLCACHE_COMPRESS=1 diff --git a/ci/scripts/python_wheel_macos_build.sh b/ci/scripts/python_wheel_macos_build.sh index 3ed9d5d8dd12f..41a6ca02a75e0 100755 --- a/ci/scripts/python_wheel_macos_build.sh +++ b/ci/scripts/python_wheel_macos_build.sh @@ -55,7 +55,9 @@ pip install \ --only-binary=:all: \ --target $PIP_SITE_PACKAGES \ --platform $PIP_TARGET_PLATFORM \ - -r ${source_dir}/python/requirements-wheel-build.txt + -r ${source_dir}/python/requirements-wheel-build.txt \ + --pre \ + --extra-index-url "https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" pip install "delocate>=0.10.3" echo "=== (${PYTHON_VERSION}) Building Arrow C++ libraries ===" diff --git a/docker-compose.yml b/docker-compose.yml index 8c84547298dcb..14abf65399927 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1099,6 +1099,7 @@ services: base: quay.io/pypa/manylinux2014_${ARCH_ALIAS}:2024-08-03-32dfa47 vcpkg: ${VCPKG} python: ${PYTHON} + python_image_tag: ${PYTHON_IMAGE_TAG} manylinux: 2014 context: . dockerfile: ci/docker/python-wheel-manylinux.dockerfile @@ -1122,6 +1123,7 @@ services: base: quay.io/pypa/manylinux_2_28_${ARCH_ALIAS}:2024-08-03-32dfa47 vcpkg: ${VCPKG} python: ${PYTHON} + python_image_tag: ${PYTHON_IMAGE_TAG} manylinux: 2_28 context: . dockerfile: ci/docker/python-wheel-manylinux.dockerfile @@ -1151,6 +1153,7 @@ services: args: arch: ${ARCH} python: ${PYTHON} + python_image_tag: ${PYTHON_IMAGE_TAG} context: . dockerfile: ci/docker/python-wheel-manylinux-test.dockerfile cache_from: From 6b36d3f39aa0f7274e5120dc5fb6d2730a3ec1c6 Mon Sep 17 00:00:00 2001 From: Lysandros Nikolaou Date: Thu, 8 Aug 2024 14:25:41 +0000 Subject: [PATCH 10/29] Fix CI; Add python_image_tag arg & install numpy>2 in 3.13 --- ci/docker/python-wheel-manylinux-test.dockerfile | 2 +- python/requirements-wheel-test.txt | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ci/docker/python-wheel-manylinux-test.dockerfile b/ci/docker/python-wheel-manylinux-test.dockerfile index e61ab8d5c7d31..7ffcb59291832 100644 --- a/ci/docker/python-wheel-manylinux-test.dockerfile +++ b/ci/docker/python-wheel-manylinux-test.dockerfile @@ -16,7 +16,7 @@ # under the License. ARG arch -ARG python +ARG python_image_tag FROM ${arch}/python:${python_image_tag} # RUN pip install --upgrade pip diff --git a/python/requirements-wheel-test.txt b/python/requirements-wheel-test.txt index 41c56568e9ef3..99e7c8e7dab88 100644 --- a/python/requirements-wheel-test.txt +++ b/python/requirements-wheel-test.txt @@ -7,7 +7,8 @@ tzdata; sys_platform == 'win32' numpy==1.21.6; platform_system == "Linux" and platform_machine == "aarch64" and python_version < "3.11" numpy==1.23.5; python_version == "3.11" -numpy==1.26.4; python_version >= "3.12" +numpy==1.26.4; python_version == "3.12" +numpy>=2; python_version == "3.13" numpy==1.19.5; platform_system == "Linux" and platform_machine != "aarch64" and python_version < "3.9" numpy==1.21.6; platform_system == "Linux" and platform_machine != "aarch64" and python_version >= "3.9" and python_version < "3.11" numpy==1.21.6; platform_system == "Darwin" and platform_machine == "arm64" and python_version < "3.11" From 14185ab025d1f1282f665498c967b922a8179183 Mon Sep 17 00:00:00 2001 From: Lysandros Nikolaou Date: Fri, 9 Aug 2024 09:33:35 +0000 Subject: [PATCH 11/29] Add pre and extra index url in requirements files; pin to pandas>=3 on 3.13 --- ci/docker/python-wheel-manylinux.dockerfile | 2 +- ci/docker/python-wheel-windows-vs2019.dockerfile | 3 +-- ci/scripts/python_wheel_macos_build.sh | 2 -- python/requirements-wheel-build.txt | 5 +++++ python/requirements-wheel-test.txt | 6 ++++++ 5 files changed, 13 insertions(+), 5 deletions(-) diff --git a/ci/docker/python-wheel-manylinux.dockerfile b/ci/docker/python-wheel-manylinux.dockerfile index ae488a8cfdb90..42f088fd8a22a 100644 --- a/ci/docker/python-wheel-manylinux.dockerfile +++ b/ci/docker/python-wheel-manylinux.dockerfile @@ -110,4 +110,4 @@ SHELL ["/bin/bash", "-i", "-c"] ENTRYPOINT ["/bin/bash", "-i", "-c"] COPY python/requirements-wheel-build.txt /arrow/python/ -RUN pip install -r /arrow/python/requirements-wheel-build.txt --pre --extra-index-url "https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" +RUN pip install -r /arrow/python/requirements-wheel-build.txt diff --git a/ci/docker/python-wheel-windows-vs2019.dockerfile b/ci/docker/python-wheel-windows-vs2019.dockerfile index 632b248714cf5..5a17e3e4c52c2 100644 --- a/ci/docker/python-wheel-windows-vs2019.dockerfile +++ b/ci/docker/python-wheel-windows-vs2019.dockerfile @@ -90,8 +90,7 @@ RUN choco install -r -y --pre --no-progress python --version=%PYTHON_VERSION% RUN python -m pip install -U pip setuptools COPY python/requirements-wheel-build.txt arrow/python/ -# TODO: Remove --pre and the extra index after NumPy release for 3.13 on PyPI -RUN python -m pip install -r arrow/python/requirements-wheel-build.txt --pre --extra-index-url "https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" +RUN python -m pip install -r arrow/python/requirements-wheel-build.txt # ENV CLCACHE_DIR="C:\clcache" # ENV CLCACHE_COMPRESS=1 diff --git a/ci/scripts/python_wheel_macos_build.sh b/ci/scripts/python_wheel_macos_build.sh index 41a6ca02a75e0..ae2aba529017f 100755 --- a/ci/scripts/python_wheel_macos_build.sh +++ b/ci/scripts/python_wheel_macos_build.sh @@ -56,8 +56,6 @@ pip install \ --target $PIP_SITE_PACKAGES \ --platform $PIP_TARGET_PLATFORM \ -r ${source_dir}/python/requirements-wheel-build.txt \ - --pre \ - --extra-index-url "https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" pip install "delocate>=0.10.3" echo "=== (${PYTHON_VERSION}) Building Arrow C++ libraries ===" diff --git a/python/requirements-wheel-build.txt b/python/requirements-wheel-build.txt index faa078d3d7fe7..2d448004768ce 100644 --- a/python/requirements-wheel-build.txt +++ b/python/requirements-wheel-build.txt @@ -1,3 +1,8 @@ +# Remove pre and extra index url once there's NumPy and Cython wheels for 3.13 +# on PyPI +--pre +--extra-index-url "https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" + cython>=0.29.31 oldest-supported-numpy>=0.14; python_version<'3.9' numpy>=2.0.0; python_version>='3.9' diff --git a/python/requirements-wheel-test.txt b/python/requirements-wheel-test.txt index 99e7c8e7dab88..c382f3ce243da 100644 --- a/python/requirements-wheel-test.txt +++ b/python/requirements-wheel-test.txt @@ -1,3 +1,8 @@ +# Remove pre and extra index url once there's NumPy and Cython wheels for 3.13 +# on PyPI +--pre +--extra-index-url "https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" + cffi cython hypothesis @@ -17,6 +22,7 @@ numpy==1.21.6; platform_system == "Darwin" and platform_machine != "arm64" an numpy==1.19.5; platform_system == "Windows" and python_version < "3.9" numpy==1.21.6; platform_system == "Windows" and python_version >= "3.9" and python_version < "3.11" +pandas>=3; python_version == "3.13" pandas<1.1.0; platform_system == "Linux" and platform_machine != "aarch64" and python_version < "3.8" pandas; platform_system == "Linux" and platform_machine != "aarch64" and python_version >= "3.8" pandas; platform_system == "Linux" and platform_machine == "aarch64" From 3ed915cfec80cf24951e76165a3b1acc24c9ca3e Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Fri, 9 Aug 2024 14:00:13 +0200 Subject: [PATCH 12/29] Update python/requirements-wheel-test.txt --- python/requirements-wheel-test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/requirements-wheel-test.txt b/python/requirements-wheel-test.txt index c382f3ce243da..89939f29da159 100644 --- a/python/requirements-wheel-test.txt +++ b/python/requirements-wheel-test.txt @@ -22,7 +22,7 @@ numpy==1.21.6; platform_system == "Darwin" and platform_machine != "arm64" an numpy==1.19.5; platform_system == "Windows" and python_version < "3.9" numpy==1.21.6; platform_system == "Windows" and python_version >= "3.9" and python_version < "3.11" -pandas>=3; python_version == "3.13" +pandas>=3.0.0.dev0; python_version == "3.13" pandas<1.1.0; platform_system == "Linux" and platform_machine != "aarch64" and python_version < "3.8" pandas; platform_system == "Linux" and platform_machine != "aarch64" and python_version >= "3.8" pandas; platform_system == "Linux" and platform_machine == "aarch64" From 975d5ec46ba5c25ce00bbb2e126028801fcbcaf8 Mon Sep 17 00:00:00 2001 From: Lysandros Nikolaou Date: Fri, 9 Aug 2024 16:25:06 +0000 Subject: [PATCH 13/29] Only use testbench when not in 3.13 --- ci/docker/python-wheel-manylinux-test.dockerfile | 4 +++- ci/scripts/install_gcs_testbench.sh | 9 +++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ci/docker/python-wheel-manylinux-test.dockerfile b/ci/docker/python-wheel-manylinux-test.dockerfile index 7ffcb59291832..1b23498ea9c7f 100644 --- a/ci/docker/python-wheel-manylinux-test.dockerfile +++ b/ci/docker/python-wheel-manylinux-test.dockerfile @@ -16,6 +16,7 @@ # under the License. ARG arch +ARG python ARG python_image_tag FROM ${arch}/python:${python_image_tag} @@ -27,4 +28,5 @@ COPY python/requirements-wheel-test.txt /arrow/python/ RUN pip install -r /arrow/python/requirements-wheel-test.txt COPY ci/scripts/install_gcs_testbench.sh /arrow/ci/scripts/ -RUN PYTHON=python /arrow/ci/scripts/install_gcs_testbench.sh default + +RUN PYTHON=${python} /arrow/ci/scripts/install_gcs_testbench.sh default diff --git a/ci/scripts/install_gcs_testbench.sh b/ci/scripts/install_gcs_testbench.sh index 2090290c99322..a297d63a13cbf 100755 --- a/ci/scripts/install_gcs_testbench.sh +++ b/ci/scripts/install_gcs_testbench.sh @@ -38,11 +38,16 @@ esac export PIP_BREAK_SYSTEM_PACKAGES=1 version=$1 +python_command="python${PYTHON:-3}" if [[ "${version}" -eq "default" ]]; then version="v0.39.0" # Latests versions of Testbench require newer setuptools ${PYTHON:-python3} -m pip install --upgrade setuptools fi -${PYTHON:-python3} -m pip install \ - "https://github.com/googleapis/storage-testbench/archive/${version}.tar.gz" +# This script is run with PYTHON undefined in some places, +# but those only use older pythons. +if [[ -z "${PYTHON}" || "${PYTHON}" != "3.13" ]]; then + ${python_command} -m pip install \ + "https://github.com/googleapis/storage-testbench/archive/${version}.tar.gz" +fi From b6623794f38d613a9467888614953429365c7749 Mon Sep 17 00:00:00 2001 From: Lysandros Nikolaou Date: Fri, 9 Aug 2024 19:35:50 +0200 Subject: [PATCH 14/29] Update ci/scripts/python_wheel_macos_build.sh Co-authored-by: Joris Van den Bossche --- ci/scripts/python_wheel_macos_build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/scripts/python_wheel_macos_build.sh b/ci/scripts/python_wheel_macos_build.sh index ae2aba529017f..3ed9d5d8dd12f 100755 --- a/ci/scripts/python_wheel_macos_build.sh +++ b/ci/scripts/python_wheel_macos_build.sh @@ -55,7 +55,7 @@ pip install \ --only-binary=:all: \ --target $PIP_SITE_PACKAGES \ --platform $PIP_TARGET_PLATFORM \ - -r ${source_dir}/python/requirements-wheel-build.txt \ + -r ${source_dir}/python/requirements-wheel-build.txt pip install "delocate>=0.10.3" echo "=== (${PYTHON_VERSION}) Building Arrow C++ libraries ===" From 1b836c7b2a8b5fd2f71b2fa885db1f4541ac72ef Mon Sep 17 00:00:00 2001 From: Lysandros Nikolaou Date: Fri, 9 Aug 2024 17:42:31 +0000 Subject: [PATCH 15/29] Fix link in install_python.sh --- ci/scripts/install_python.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/ci/scripts/install_python.sh b/ci/scripts/install_python.sh index 9eddd92756643..42d0e9ca179fb 100755 --- a/ci/scripts/install_python.sh +++ b/ci/scripts/install_python.sh @@ -30,7 +30,7 @@ versions=([3.8]=3.8.10 [3.10]=3.10.11 [3.11]=3.11.9 [3.12]=3.12.4 - [3.13]=3.13.0rc1) + [3.13]=3.13.0) if [ "$#" -ne 2 ]; then echo "Usage: $0 " @@ -47,11 +47,13 @@ full_version=${versions[$2]} if [ $platform = "macOS" ]; then echo "Downloading Python installer..." - if [ "$(uname -m)" = "arm64" ] || \ - [ "$version" = "3.10" ] || \ - [ "$version" = "3.11" ] || \ - [ "$version" = "3.12" ] || \ - [ "$version" = "3.13" ]; + if [ "$version" = "3.13" ]; + then + fname="python-${full_version}rc1-macos11.pkg" + elif [ "$(uname -m)" = "arm64" ] || \ + [ "$version" = "3.10" ] || \ + [ "$version" = "3.11" ] || \ + [ "$version" = "3.12" ]; then fname="python-${full_version}-macos11.pkg" else From 4f5c3f63a2500b7b50c1d2c000b9571ab2c4af9d Mon Sep 17 00:00:00 2001 From: Lysandros Nikolaou Date: Mon, 12 Aug 2024 13:01:01 +0000 Subject: [PATCH 16/29] Set env correctly in macOS --- dev/tasks/python-wheels/github.osx.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/tasks/python-wheels/github.osx.yml b/dev/tasks/python-wheels/github.osx.yml index 8ceb468af89dd..b47aeb4018c51 100644 --- a/dev/tasks/python-wheels/github.osx.yml +++ b/dev/tasks/python-wheels/github.osx.yml @@ -121,7 +121,7 @@ jobs: source test-env/bin/activate pip install --upgrade pip wheel arch -{{ arch }} pip install -r arrow/python/requirements-wheel-test.txt - PYTHON=python arch -{{ arch }} arrow/ci/scripts/install_gcs_testbench.sh default + PYTHON={{ python_version }} arch -{{ arch }} arrow/ci/scripts/install_gcs_testbench.sh default arch -{{ arch }} arrow/ci/scripts/python_wheel_unix_test.sh $(pwd)/arrow {{ macros.github_upload_releases("arrow/python/repaired_wheels/*.whl")|indent }} From 93b06a383ec22626cb60ac8567d7b610138c1a5c Mon Sep 17 00:00:00 2001 From: Lysandros Nikolaou Date: Mon, 12 Aug 2024 13:03:47 +0000 Subject: [PATCH 17/29] Remove --platform when running pip intall --- ci/scripts/python_wheel_macos_build.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/ci/scripts/python_wheel_macos_build.sh b/ci/scripts/python_wheel_macos_build.sh index 3ed9d5d8dd12f..d5430f26748eb 100755 --- a/ci/scripts/python_wheel_macos_build.sh +++ b/ci/scripts/python_wheel_macos_build.sh @@ -48,13 +48,11 @@ fi echo "=== (${PYTHON_VERSION}) Install Python build dependencies ===" export PIP_SITE_PACKAGES=$(python -c 'import site; print(site.getsitepackages()[0])') -export PIP_TARGET_PLATFORM="macosx_${MACOSX_DEPLOYMENT_TARGET//./_}_${arch}" pip install \ --upgrade \ --only-binary=:all: \ --target $PIP_SITE_PACKAGES \ - --platform $PIP_TARGET_PLATFORM \ -r ${source_dir}/python/requirements-wheel-build.txt pip install "delocate>=0.10.3" From 89965c18ed974597b66ade02f991050c093ea476 Mon Sep 17 00:00:00 2001 From: Lysandros Nikolaou Date: Mon, 12 Aug 2024 14:36:12 +0000 Subject: [PATCH 18/29] Fix pip install setuptools in install_gcs_testbench --- ci/scripts/install_gcs_testbench.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/scripts/install_gcs_testbench.sh b/ci/scripts/install_gcs_testbench.sh index a297d63a13cbf..b6ad72e735eb9 100755 --- a/ci/scripts/install_gcs_testbench.sh +++ b/ci/scripts/install_gcs_testbench.sh @@ -42,7 +42,7 @@ python_command="python${PYTHON:-3}" if [[ "${version}" -eq "default" ]]; then version="v0.39.0" # Latests versions of Testbench require newer setuptools - ${PYTHON:-python3} -m pip install --upgrade setuptools + ${python_command} -m pip install --upgrade setuptools fi # This script is run with PYTHON undefined in some places, From eab3cfdd348e2cb503394bc773336193885f1341 Mon Sep 17 00:00:00 2001 From: Lysandros Nikolaou Date: Mon, 12 Aug 2024 14:44:13 +0000 Subject: [PATCH 19/29] Use PYTHON_VERSION environment variable in install_gcs_testbench --- ci/docker/python-wheel-manylinux-test.dockerfile | 2 +- ci/scripts/install_gcs_testbench.sh | 7 +++---- dev/tasks/python-wheels/github.osx.yml | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/ci/docker/python-wheel-manylinux-test.dockerfile b/ci/docker/python-wheel-manylinux-test.dockerfile index 1b23498ea9c7f..b86c8073cc853 100644 --- a/ci/docker/python-wheel-manylinux-test.dockerfile +++ b/ci/docker/python-wheel-manylinux-test.dockerfile @@ -29,4 +29,4 @@ RUN pip install -r /arrow/python/requirements-wheel-test.txt COPY ci/scripts/install_gcs_testbench.sh /arrow/ci/scripts/ -RUN PYTHON=${python} /arrow/ci/scripts/install_gcs_testbench.sh default +RUN PYTHON_VERSION=${python} /arrow/ci/scripts/install_gcs_testbench.sh default diff --git a/ci/scripts/install_gcs_testbench.sh b/ci/scripts/install_gcs_testbench.sh index b6ad72e735eb9..4bd647b307f1f 100755 --- a/ci/scripts/install_gcs_testbench.sh +++ b/ci/scripts/install_gcs_testbench.sh @@ -38,16 +38,15 @@ esac export PIP_BREAK_SYSTEM_PACKAGES=1 version=$1 -python_command="python${PYTHON:-3}" if [[ "${version}" -eq "default" ]]; then version="v0.39.0" # Latests versions of Testbench require newer setuptools - ${python_command} -m pip install --upgrade setuptools + python3 -m pip install --upgrade setuptools fi # This script is run with PYTHON undefined in some places, # but those only use older pythons. -if [[ -z "${PYTHON}" || "${PYTHON}" != "3.13" ]]; then - ${python_command} -m pip install \ +if [[ -z "${PYTHON_VERSION}" || "${PYTHON_VERSION}" != "3.13" ]]; then + python3 -m pip install \ "https://github.com/googleapis/storage-testbench/archive/${version}.tar.gz" fi diff --git a/dev/tasks/python-wheels/github.osx.yml b/dev/tasks/python-wheels/github.osx.yml index b47aeb4018c51..b26aeba32b79b 100644 --- a/dev/tasks/python-wheels/github.osx.yml +++ b/dev/tasks/python-wheels/github.osx.yml @@ -121,7 +121,7 @@ jobs: source test-env/bin/activate pip install --upgrade pip wheel arch -{{ arch }} pip install -r arrow/python/requirements-wheel-test.txt - PYTHON={{ python_version }} arch -{{ arch }} arrow/ci/scripts/install_gcs_testbench.sh default + PYTHON_VERSION={{ python_version }} arch -{{ arch }} arrow/ci/scripts/install_gcs_testbench.sh default arch -{{ arch }} arrow/ci/scripts/python_wheel_unix_test.sh $(pwd)/arrow {{ macros.github_upload_releases("arrow/python/repaired_wheels/*.whl")|indent }} From 489bae6400a26a23a399a0d440dbafebafe952ac Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Tue, 13 Aug 2024 08:09:50 +0200 Subject: [PATCH 20/29] Update ci/docker/python-wheel-manylinux-test.dockerfile --- ci/docker/python-wheel-manylinux-test.dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ci/docker/python-wheel-manylinux-test.dockerfile b/ci/docker/python-wheel-manylinux-test.dockerfile index b86c8073cc853..689abb8f0029b 100644 --- a/ci/docker/python-wheel-manylinux-test.dockerfile +++ b/ci/docker/python-wheel-manylinux-test.dockerfile @@ -29,4 +29,5 @@ RUN pip install -r /arrow/python/requirements-wheel-test.txt COPY ci/scripts/install_gcs_testbench.sh /arrow/ci/scripts/ -RUN PYTHON_VERSION=${python} /arrow/ci/scripts/install_gcs_testbench.sh default +ENV PYTHON_VERSION=${python} +RUN /arrow/ci/scripts/install_gcs_testbench.sh default From 00efbd9a9888ee10f191b0a3eb2f02d11d2555fc Mon Sep 17 00:00:00 2001 From: Lysandros Nikolaou Date: Tue, 13 Aug 2024 07:48:53 +0000 Subject: [PATCH 21/29] Debug python version --- ci/scripts/install_gcs_testbench.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/scripts/install_gcs_testbench.sh b/ci/scripts/install_gcs_testbench.sh index 4bd647b307f1f..8ff4cba39a4a5 100755 --- a/ci/scripts/install_gcs_testbench.sh +++ b/ci/scripts/install_gcs_testbench.sh @@ -47,6 +47,7 @@ fi # This script is run with PYTHON undefined in some places, # but those only use older pythons. if [[ -z "${PYTHON_VERSION}" || "${PYTHON_VERSION}" != "3.13" ]]; then + echo "Python version: ${PYTHON_VERSION:-notset}" python3 -m pip install \ "https://github.com/googleapis/storage-testbench/archive/${version}.tar.gz" fi From 62d27d3bae9432c2154bdf49a5a74e8ac2431583 Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Tue, 13 Aug 2024 10:25:54 +0200 Subject: [PATCH 22/29] more debugging --- ci/docker/python-wheel-manylinux-test.dockerfile | 10 ++++++---- dev/tasks/python-wheels/github.linux.yml | 15 +++++++-------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/ci/docker/python-wheel-manylinux-test.dockerfile b/ci/docker/python-wheel-manylinux-test.dockerfile index 689abb8f0029b..ad9f97ae3efd4 100644 --- a/ci/docker/python-wheel-manylinux-test.dockerfile +++ b/ci/docker/python-wheel-manylinux-test.dockerfile @@ -24,10 +24,12 @@ FROM ${arch}/python:${python_image_tag} # 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/ -RUN pip install -r /arrow/python/requirements-wheel-test.txt +# COPY python/requirements-wheel-test.txt /arrow/python/ +# RUN pip install -r /arrow/python/requirements-wheel-test.txt COPY ci/scripts/install_gcs_testbench.sh /arrow/ci/scripts/ -ENV PYTHON_VERSION=${python} -RUN /arrow/ci/scripts/install_gcs_testbench.sh default +RUN echo "python: ${python:-notset}" +RUN echo "python_image_tag: ${python_image_tag:-notset}" + +RUN PYTHON_VERSION=${python} /arrow/ci/scripts/install_gcs_testbench.sh default diff --git a/dev/tasks/python-wheels/github.linux.yml b/dev/tasks/python-wheels/github.linux.yml index 2854d4349fb7c..9ff04495941d7 100644 --- a/dev/tasks/python-wheels/github.linux.yml +++ b/dev/tasks/python-wheels/github.linux.yml @@ -47,20 +47,19 @@ jobs: {{ macros.github_install_archery()|indent }} {{ macros.github_login_dockerhub()|indent }} - - name: Build wheel - shell: bash - run: archery docker run -e SETUPTOOLS_SCM_PRETEND_VERSION={{ arrow.no_rc_version }} python-wheel-manylinux-{{ manylinux_version }} + # - name: Build wheel + # shell: bash + # run: archery docker run -e SETUPTOOLS_SCM_PRETEND_VERSION={{ arrow.no_rc_version }} python-wheel-manylinux-{{ manylinux_version }} - - uses: actions/upload-artifact@v3 - with: - name: wheel - path: arrow/python/repaired_wheels/*.whl + # - uses: actions/upload-artifact@v3 + # with: + # name: wheel + # path: arrow/python/repaired_wheels/*.whl # TODO(kszucs): auditwheel show - name: Test wheel shell: bash run: | - archery docker run python-wheel-manylinux-test-imports archery docker run python-wheel-manylinux-test-unittests - name: Test wheel on AlmaLinux 8 From 4332b6e89d45e018f7fefb1bdc13799c0973578d Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Tue, 13 Aug 2024 10:31:18 +0200 Subject: [PATCH 23/29] fix and undo debugging --- ci/docker/python-wheel-manylinux-test.dockerfile | 11 +++++------ ci/scripts/install_gcs_testbench.sh | 1 - dev/tasks/python-wheels/github.linux.yml | 15 ++++++++------- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/ci/docker/python-wheel-manylinux-test.dockerfile b/ci/docker/python-wheel-manylinux-test.dockerfile index ad9f97ae3efd4..18d0d9bf67bc7 100644 --- a/ci/docker/python-wheel-manylinux-test.dockerfile +++ b/ci/docker/python-wheel-manylinux-test.dockerfile @@ -20,16 +20,15 @@ ARG python ARG python_image_tag FROM ${arch}/python:${python_image_tag} +# (Docker oddity: ARG needs to be repeated after FROM) +ARG python + # RUN pip install --upgrade pip # 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/ -# RUN pip install -r /arrow/python/requirements-wheel-test.txt +COPY python/requirements-wheel-test.txt /arrow/python/ +RUN pip install -r /arrow/python/requirements-wheel-test.txt COPY ci/scripts/install_gcs_testbench.sh /arrow/ci/scripts/ - -RUN echo "python: ${python:-notset}" -RUN echo "python_image_tag: ${python_image_tag:-notset}" - RUN PYTHON_VERSION=${python} /arrow/ci/scripts/install_gcs_testbench.sh default diff --git a/ci/scripts/install_gcs_testbench.sh b/ci/scripts/install_gcs_testbench.sh index 8ff4cba39a4a5..4bd647b307f1f 100755 --- a/ci/scripts/install_gcs_testbench.sh +++ b/ci/scripts/install_gcs_testbench.sh @@ -47,7 +47,6 @@ fi # This script is run with PYTHON undefined in some places, # but those only use older pythons. if [[ -z "${PYTHON_VERSION}" || "${PYTHON_VERSION}" != "3.13" ]]; then - echo "Python version: ${PYTHON_VERSION:-notset}" python3 -m pip install \ "https://github.com/googleapis/storage-testbench/archive/${version}.tar.gz" fi diff --git a/dev/tasks/python-wheels/github.linux.yml b/dev/tasks/python-wheels/github.linux.yml index 9ff04495941d7..2854d4349fb7c 100644 --- a/dev/tasks/python-wheels/github.linux.yml +++ b/dev/tasks/python-wheels/github.linux.yml @@ -47,19 +47,20 @@ jobs: {{ macros.github_install_archery()|indent }} {{ macros.github_login_dockerhub()|indent }} - # - name: Build wheel - # shell: bash - # run: archery docker run -e SETUPTOOLS_SCM_PRETEND_VERSION={{ arrow.no_rc_version }} python-wheel-manylinux-{{ manylinux_version }} + - name: Build wheel + shell: bash + run: archery docker run -e SETUPTOOLS_SCM_PRETEND_VERSION={{ arrow.no_rc_version }} python-wheel-manylinux-{{ manylinux_version }} - # - uses: actions/upload-artifact@v3 - # with: - # name: wheel - # path: arrow/python/repaired_wheels/*.whl + - uses: actions/upload-artifact@v3 + with: + name: wheel + path: arrow/python/repaired_wheels/*.whl # TODO(kszucs): auditwheel show - name: Test wheel shell: bash run: | + archery docker run python-wheel-manylinux-test-imports archery docker run python-wheel-manylinux-test-unittests - name: Test wheel on AlmaLinux 8 From 0b5b2aa97649e294c0c8dd65b64a0217c6546b4f Mon Sep 17 00:00:00 2001 From: Lysandros Nikolaou Date: Tue, 13 Aug 2024 08:36:12 +0000 Subject: [PATCH 24/29] Fix manylinux installing testbench --- ci/docker/python-wheel-manylinux-test.dockerfile | 8 ++++---- ci/scripts/install_gcs_testbench.sh | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ci/docker/python-wheel-manylinux-test.dockerfile b/ci/docker/python-wheel-manylinux-test.dockerfile index 18d0d9bf67bc7..73ccf2ec936e1 100644 --- a/ci/docker/python-wheel-manylinux-test.dockerfile +++ b/ci/docker/python-wheel-manylinux-test.dockerfile @@ -15,13 +15,13 @@ # specific language governing permissions and limitations # under the License. +# Only ARGs before the first build step are available for all build steps. ARG arch ARG python ARG python_image_tag -FROM ${arch}/python:${python_image_tag} +ARG PYTHON_VERSION=${python} -# (Docker oddity: ARG needs to be repeated after FROM) -ARG python +FROM ${arch}/python:${python_image_tag} # RUN pip install --upgrade pip @@ -31,4 +31,4 @@ COPY python/requirements-wheel-test.txt /arrow/python/ RUN pip install -r /arrow/python/requirements-wheel-test.txt COPY ci/scripts/install_gcs_testbench.sh /arrow/ci/scripts/ -RUN PYTHON_VERSION=${python} /arrow/ci/scripts/install_gcs_testbench.sh default +RUN /arrow/ci/scripts/install_gcs_testbench.sh default diff --git a/ci/scripts/install_gcs_testbench.sh b/ci/scripts/install_gcs_testbench.sh index 4bd647b307f1f..ca073d4b87aa1 100755 --- a/ci/scripts/install_gcs_testbench.sh +++ b/ci/scripts/install_gcs_testbench.sh @@ -46,7 +46,7 @@ fi # This script is run with PYTHON undefined in some places, # but those only use older pythons. -if [[ -z "${PYTHON_VERSION}" || "${PYTHON_VERSION}" != "3.13" ]]; then +if [[ -z "${PYTHON_VERSION}" ]] || ![[ "${PYTHON_VERSION}" == "*3.13*" ]]; then python3 -m pip install \ "https://github.com/googleapis/storage-testbench/archive/${version}.tar.gz" fi From 825bb987ccdf38747da8be3ab25c7e764184921e Mon Sep 17 00:00:00 2001 From: Lysandros Nikolaou Date: Tue, 13 Aug 2024 08:48:15 +0000 Subject: [PATCH 25/29] Fix typo --- ci/scripts/install_gcs_testbench.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/scripts/install_gcs_testbench.sh b/ci/scripts/install_gcs_testbench.sh index ca073d4b87aa1..fbfccb1a150a4 100755 --- a/ci/scripts/install_gcs_testbench.sh +++ b/ci/scripts/install_gcs_testbench.sh @@ -46,7 +46,7 @@ fi # This script is run with PYTHON undefined in some places, # but those only use older pythons. -if [[ -z "${PYTHON_VERSION}" ]] || ![[ "${PYTHON_VERSION}" == "*3.13*" ]]; then +if [[ -z "${PYTHON_VERSION}" ]] || [[ ! "${PYTHON_VERSION}" == "*3.13*" ]]; then python3 -m pip install \ "https://github.com/googleapis/storage-testbench/archive/${version}.tar.gz" fi From d2e43474ad342eff0fcc3c88aab76b5dd62f0c9e Mon Sep 17 00:00:00 2001 From: Lysandros Nikolaou Date: Tue, 13 Aug 2024 11:07:34 +0200 Subject: [PATCH 26/29] Correctly set python build arg and PYTHON_VERSION env var --- ci/docker/python-wheel-manylinux-test.dockerfile | 6 ++---- ci/scripts/install_gcs_testbench.sh | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/ci/docker/python-wheel-manylinux-test.dockerfile b/ci/docker/python-wheel-manylinux-test.dockerfile index 73ccf2ec936e1..cc8e7396c4e3a 100644 --- a/ci/docker/python-wheel-manylinux-test.dockerfile +++ b/ci/docker/python-wheel-manylinux-test.dockerfile @@ -17,10 +17,7 @@ # Only ARGs before the first build step are available for all build steps. ARG arch -ARG python ARG python_image_tag -ARG PYTHON_VERSION=${python} - FROM ${arch}/python:${python_image_tag} # RUN pip install --upgrade pip @@ -31,4 +28,5 @@ COPY python/requirements-wheel-test.txt /arrow/python/ RUN pip install -r /arrow/python/requirements-wheel-test.txt COPY ci/scripts/install_gcs_testbench.sh /arrow/ci/scripts/ -RUN /arrow/ci/scripts/install_gcs_testbench.sh default +ARG python +RUN PYTHON_VERSION=${python} /arrow/ci/scripts/install_gcs_testbench.sh default diff --git a/ci/scripts/install_gcs_testbench.sh b/ci/scripts/install_gcs_testbench.sh index fbfccb1a150a4..5471b3cc238ca 100755 --- a/ci/scripts/install_gcs_testbench.sh +++ b/ci/scripts/install_gcs_testbench.sh @@ -46,7 +46,7 @@ fi # This script is run with PYTHON undefined in some places, # but those only use older pythons. -if [[ -z "${PYTHON_VERSION}" ]] || [[ ! "${PYTHON_VERSION}" == "*3.13*" ]]; then +if [[ -z "${PYTHON_VERSION}" ]] || [[ "${PYTHON_VERSION}" != "3.13" ]]; then python3 -m pip install \ "https://github.com/googleapis/storage-testbench/archive/${version}.tar.gz" fi From 7ddac07824437f490c1ceb51ef52b281b2848467 Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Tue, 13 Aug 2024 14:28:11 +0200 Subject: [PATCH 27/29] Update python/requirements-wheel-test.txt --- python/requirements-wheel-test.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/python/requirements-wheel-test.txt b/python/requirements-wheel-test.txt index 89939f29da159..21e4d8eb2f9fb 100644 --- a/python/requirements-wheel-test.txt +++ b/python/requirements-wheel-test.txt @@ -1,6 +1,7 @@ # Remove pre and extra index url once there's NumPy and Cython wheels for 3.13 # on PyPI --pre +--prefer-binary --extra-index-url "https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" cffi From e12e2f51e555cf45c417afd81ea8a295a6fca9dc Mon Sep 17 00:00:00 2001 From: Lysandros Nikolaou Date: Thu, 15 Aug 2024 16:16:37 +0200 Subject: [PATCH 28/29] Update ci/docker/python-wheel-manylinux-test.dockerfile Co-authored-by: Joris Van den Bossche --- ci/docker/python-wheel-manylinux-test.dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/ci/docker/python-wheel-manylinux-test.dockerfile b/ci/docker/python-wheel-manylinux-test.dockerfile index cc8e7396c4e3a..443ff9c53cbcb 100644 --- a/ci/docker/python-wheel-manylinux-test.dockerfile +++ b/ci/docker/python-wheel-manylinux-test.dockerfile @@ -15,7 +15,6 @@ # specific language governing permissions and limitations # under the License. -# Only ARGs before the first build step are available for all build steps. ARG arch ARG python_image_tag FROM ${arch}/python:${python_image_tag} From 1e9e3872bf05edf0c8d45f320d7fc40840a2563b Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Tue, 20 Aug 2024 16:11:55 +0200 Subject: [PATCH 29/29] pin to numpy 2.1.0 now it is released --- python/requirements-wheel-test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/requirements-wheel-test.txt b/python/requirements-wheel-test.txt index 21e4d8eb2f9fb..45c612c5dfdf4 100644 --- a/python/requirements-wheel-test.txt +++ b/python/requirements-wheel-test.txt @@ -14,7 +14,7 @@ tzdata; sys_platform == 'win32' numpy==1.21.6; platform_system == "Linux" and platform_machine == "aarch64" and python_version < "3.11" numpy==1.23.5; python_version == "3.11" numpy==1.26.4; python_version == "3.12" -numpy>=2; python_version == "3.13" +numpy~=2.1.0; python_version == "3.13" numpy==1.19.5; platform_system == "Linux" and platform_machine != "aarch64" and python_version < "3.9" numpy==1.21.6; platform_system == "Linux" and platform_machine != "aarch64" and python_version >= "3.9" and python_version < "3.11" numpy==1.21.6; platform_system == "Darwin" and platform_machine == "arm64" and python_version < "3.11"