diff --git a/.env b/.env index 1735b7163b4..def99a94fec 100644 --- a/.env +++ b/.env @@ -98,8 +98,8 @@ VCPKG="4334d8b4c8916018600212ab4dd4bbdc343065d1" # 2025.09.17 Release # ci/docker/python-*-windows-*.dockerfile or the vcpkg config. # 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=2025-09-04 -PYTHON_WHEEL_WINDOWS_TEST_IMAGE_REVISION=2025-09-04 +PYTHON_WHEEL_WINDOWS_IMAGE_REVISION=2025-10-13 +PYTHON_WHEEL_WINDOWS_TEST_IMAGE_REVISION=2025-10-13 # Use conanio/${CONAN_BASE}:{CONAN_VERSION} for "docker compose run --rm conan". # See https://github.com/conan-io/conan-docker-tools#readme and diff --git a/ci/docker/python-free-threaded-wheel-manylinux-test-imports.dockerfile b/ci/docker/python-free-threaded-wheel-manylinux-test-imports.dockerfile index c884611ca39..e4149821de3 100644 --- a/ci/docker/python-free-threaded-wheel-manylinux-test-imports.dockerfile +++ b/ci/docker/python-free-threaded-wheel-manylinux-test-imports.dockerfile @@ -18,18 +18,20 @@ ARG base FROM ${base} +ARG python_version=3.13 + ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update -y -q && \ apt install -y -q --no-install-recommends software-properties-common gpg-agent && \ add-apt-repository -y ppa:deadsnakes/ppa && \ apt-get update -y -q && \ - apt install -y -q --no-install-recommends python3.13-dev python3.13-nogil python3.13-venv && \ + apt install -y -q --no-install-recommends python${python_version}-dev python${python_version}-nogil python${python_version}-venv && \ apt-get clean && \ rm -rf /var/lib/apt/lists* ENV ARROW_PYTHON_VENV /arrow-dev -RUN python3.13t -m venv ${ARROW_PYTHON_VENV} +RUN python${python_version}t -m venv ${ARROW_PYTHON_VENV} ENV PYTHON_GIL 0 ENV PATH "${ARROW_PYTHON_VENV}/bin:${PATH}" diff --git a/ci/docker/python-free-threaded-wheel-manylinux-test-unittests.dockerfile b/ci/docker/python-free-threaded-wheel-manylinux-test-unittests.dockerfile index 3c4c53f805e..566f0c0402a 100644 --- a/ci/docker/python-free-threaded-wheel-manylinux-test-unittests.dockerfile +++ b/ci/docker/python-free-threaded-wheel-manylinux-test-unittests.dockerfile @@ -18,6 +18,8 @@ ARG base FROM ${base} +ARG python_version=3.13 + ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update -y -q && \ @@ -27,14 +29,14 @@ RUN apt-get update -y -q && \ apt install -y -q --no-install-recommends \ build-essential \ libffi-dev \ - python3.13-dev \ - python3.13-nogil \ - python3.13-venv && \ + python${python_version}-dev \ + python${python_version}-nogil \ + python${python_version}-venv && \ apt-get clean && \ rm -rf /var/lib/apt/lists* ENV ARROW_PYTHON_VENV /arrow-dev -RUN python3.13t -m venv ${ARROW_PYTHON_VENV} +RUN python${python_version}t -m venv ${ARROW_PYTHON_VENV} ENV PYTHON_GIL 0 ENV PATH "${ARROW_PYTHON_VENV}/bin:${PATH}" diff --git a/ci/docker/python-free-threaded-wheel-musllinux-test-imports.dockerfile b/ci/docker/python-free-threaded-wheel-musllinux-test-imports.dockerfile index 526f345416b..e79facb4904 100644 --- a/ci/docker/python-free-threaded-wheel-musllinux-test-imports.dockerfile +++ b/ci/docker/python-free-threaded-wheel-musllinux-test-imports.dockerfile @@ -18,6 +18,9 @@ ARG base FROM ${base} +ARG python_version=3.13 +ARG python_patch_version=3.13.7 + RUN apk add --no-cache \ bash \ build-base \ @@ -34,19 +37,19 @@ RUN apk add --no-cache \ tzdata \ zlib-dev -# Install Python3.13.2 without GIL -RUN wget https://github.com/python/cpython/archive/refs/tags/v3.13.2.tar.gz && \ - tar -xzf v3.13.2.tar.gz && \ - rm v3.13.2.tar.gz && \ - cd cpython-3.13.2/ && \ +# Install Python without GIL +RUN wget https://github.com/python/cpython/archive/refs/tags/v${python_patch_version}.tar.gz && \ + tar -xzf v${python_patch_version}.tar.gz && \ + rm v${python_patch_version}.tar.gz && \ + cd cpython-${python_patch_version}/ && \ ./configure --disable-gil --with-ensurepip && \ make -j && \ make install && \ cd ../ && \ - rm -rf cpython-3.13.2/ + rm -rf cpython-${python_patch_version}/ ENV ARROW_PYTHON_VENV /arrow-dev -RUN python3.13t -m venv ${ARROW_PYTHON_VENV} +RUN python${python_version}t -m venv ${ARROW_PYTHON_VENV} ENV PYTHON_GIL 0 ENV PATH "${ARROW_PYTHON_VENV}/bin:${PATH}" diff --git a/ci/docker/python-free-threaded-wheel-musllinux-test-unittests.dockerfile b/ci/docker/python-free-threaded-wheel-musllinux-test-unittests.dockerfile index fa2139b6ba5..3b170087ba8 100644 --- a/ci/docker/python-free-threaded-wheel-musllinux-test-unittests.dockerfile +++ b/ci/docker/python-free-threaded-wheel-musllinux-test-unittests.dockerfile @@ -18,6 +18,9 @@ ARG base FROM ${base} +ARG python_version=3.13 +ARG python_patch_version=3.13.7 + RUN apk add --no-cache \ bash \ build-base \ @@ -34,19 +37,19 @@ RUN apk add --no-cache \ tzdata \ zlib-dev -# Install Python3.13.2 without GIL -RUN wget https://github.com/python/cpython/archive/refs/tags/v3.13.2.tar.gz && \ - tar -xzf v3.13.2.tar.gz && \ - rm v3.13.2.tar.gz && \ - cd cpython-3.13.2/ && \ +# Install Python without GIL +RUN wget https://github.com/python/cpython/archive/refs/tags/v${python_patch_version}.tar.gz && \ + tar -xzf v${python_patch_version}.tar.gz && \ + rm v${python_patch_version}.tar.gz && \ + cd cpython-${python_patch_version}/ && \ ./configure --disable-gil --with-ensurepip && \ make -j && \ make install && \ cd ../ && \ - rm -rf cpython-3.13.2/ + rm -rf cpython-${python_patch_version}/ ENV ARROW_PYTHON_VENV /arrow-dev -RUN python3.13t -m venv ${ARROW_PYTHON_VENV} +RUN python${python_version}t -m venv ${ARROW_PYTHON_VENV} ENV PYTHON_GIL 0 ENV PATH "${ARROW_PYTHON_VENV}/bin:${PATH}" diff --git a/ci/docker/python-free-threaded-wheel-windows-test-vs2022.dockerfile b/ci/docker/python-free-threaded-wheel-windows-test-vs2022.dockerfile index 5b27c786ff4..ab257b271e5 100644 --- a/ci/docker/python-free-threaded-wheel-windows-test-vs2022.dockerfile +++ b/ci/docker/python-free-threaded-wheel-windows-test-vs2022.dockerfile @@ -26,24 +26,34 @@ FROM ${base} ARG python=3.13 +# hadolint ignore=SC1072 +RUN (if "%python%"=="3.13" setx PYTHON_VERSION "3.13.1") & \ + (if "%python%"=="3.14" setx PYTHON_VERSION "3.14.0") + SHELL ["powershell", "-NoProfile", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] -RUN $filename = 'python-3.13.1-amd64.exe'; \ - $url = 'https://www.python.org/ftp/python/3.13.1/' + $filename; \ +RUN $version = $env:PYTHON_VERSION; \ + $filename = 'python-' + $version + '-amd64.exe'; \ + $url = 'https://www.python.org/ftp/python/' + $version + '/' + $filename; \ Invoke-WebRequest -Uri $url -OutFile $filename; \ Start-Process -FilePath $filename -ArgumentList '/quiet', 'Include_freethreaded=1' -Wait ENV PYTHON_CMD="py -${python}t" SHELL ["cmd", "/S", "/C"] -RUN %PYTHON_CMD% -m pip install -U pip setuptools - -COPY python/requirements-wheel-test-3.13t.txt C:/arrow/python/ -# Cython and Pandas wheels for 3.13 free-threaded are not released yet +RUN %PYTHON_CMD% -m pip install -U pip setuptools & \ + if "%python%"=="3.13" ( \ + setx REQUIREMENTS_FILE "requirements-wheel-test-3.13t.txt" \ + ) else ( \ + setx REQUIREMENTS_FILE "requirements-wheel-test.txt" \ + ) + +COPY python/requirements-wheel-test-3.13t.txt python/requirements-wheel-test.txt C:/arrow/python/ +# Cython and Pandas wheels for free-threaded are not released yet RUN %PYTHON_CMD% -m pip install \ --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple \ --pre \ --prefer-binary \ - -r C:/arrow/python/requirements-wheel-test-3.13t.txt + -r C:/arrow/python/%REQUIREMENTS_FILE% ENV PYTHON="${python}t" ENV PYTHON_GIL=0 diff --git a/ci/docker/python-free-threaded-wheel-windows-vs2022.dockerfile b/ci/docker/python-free-threaded-wheel-windows-vs2022.dockerfile index adbdccde71d..77a64fd5c24 100644 --- a/ci/docker/python-free-threaded-wheel-windows-vs2022.dockerfile +++ b/ci/docker/python-free-threaded-wheel-windows-vs2022.dockerfile @@ -26,9 +26,13 @@ FROM ${base} ARG python=3.13 +RUN (if "%python%"=="3.13" setx PYTHON_VERSION "3.13.1") & \ + (if "%python%"=="3.14" setx PYTHON_VERSION "3.14.0") + SHELL ["powershell", "-NoProfile", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] -RUN $filename = 'python-3.13.1-amd64.exe'; \ - $url = 'https://www.python.org/ftp/python/3.13.1/' + $filename; \ +RUN $version = $env:PYTHON_VERSION; \ + $filename = 'python-' + $version + '-amd64.exe'; \ + $url = 'https://www.python.org/ftp/python/' + $version + '/' + $filename; \ Invoke-WebRequest -Uri $url -OutFile $filename; \ Start-Process -FilePath $filename -ArgumentList '/quiet', 'Include_freethreaded=1' -Wait diff --git a/ci/docker/python-wheel-musllinux.dockerfile b/ci/docker/python-wheel-musllinux.dockerfile index c1c4fd5bd28..d00d44bd093 100644 --- a/ci/docker/python-wheel-musllinux.dockerfile +++ b/ci/docker/python-wheel-musllinux.dockerfile @@ -82,6 +82,7 @@ RUN --mount=type=secret,id=github_repository_owner \ export GITHUB_REPOSITORY_OWNER=$(cat /run/secrets/github_repository_owner); \ export GITHUB_TOKEN=$(cat /run/secrets/github_token); \ export VCPKG_BINARY_SOURCES=$(cat /run/secrets/vcpkg_binary_sources); \ + export CMAKE_POLICY_VERSION_MINIMUM=3.5; \ arrow/ci/scripts/install_vcpkg.sh ${VCPKG_ROOT} ${vcpkg} && \ vcpkg install \ --clean-after-build \ @@ -110,10 +111,5 @@ RUN PYTHON_ROOT=$(find /opt/python -name cp${PYTHON_VERSION/./}-${PYTHON_ABI_TAG SHELL ["/bin/bash", "-i", "-c", "-l"] ENTRYPOINT ["/bin/bash", "-i", "-c", "-l"] -# Remove once there are released Cython wheels for 3.13 free-threaded available -RUN if [ "${python_abi_tag}" = "cp313t" ]; then \ - pip install cython --pre --extra-index-url "https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" --prefer-binary ; \ - fi - COPY python/requirements-wheel-build.txt /arrow/python/ RUN pip install -r /arrow/python/requirements-wheel-build.txt diff --git a/ci/docker/python-wheel-windows-test-vs2022.dockerfile b/ci/docker/python-wheel-windows-test-vs2022.dockerfile index a520fac6215..1bed37eb001 100644 --- a/ci/docker/python-wheel-windows-test-vs2022.dockerfile +++ b/ci/docker/python-wheel-windows-test-vs2022.dockerfile @@ -30,8 +30,9 @@ FROM ${base} ARG python=3.10 RUN (if "%python%"=="3.10" setx PYTHON_VERSION "3.10.11" && setx PYTHON_CMD "py -3.10") & \ (if "%python%"=="3.11" setx PYTHON_VERSION "3.11.9" && setx PYTHON_CMD "py -3.11") & \ - (if "%python%"=="3.12" setx PYTHON_VERSION "3.12.8" && setx PYTHON_CMD "py -3.12") & \ - (if "%python%"=="3.13" setx PYTHON_VERSION "3.13.1" && setx PYTHON_CMD "py -3.13") + (if "%python%"=="3.12" setx PYTHON_VERSION "3.12.10" && setx PYTHON_CMD "py -3.12") & \ + (if "%python%"=="3.13" setx PYTHON_VERSION "3.13.7" && setx PYTHON_CMD "py -3.13") & \ + (if "%python%"=="3.14" setx PYTHON_VERSION "3.14.0" && setx PYTHON_CMD "py -3.14") # hadolint ignore=DL3059 RUN choco install -r -y --pre --no-progress --force python --version=%PYTHON_VERSION% diff --git a/ci/docker/python-wheel-windows-vs2022.dockerfile b/ci/docker/python-wheel-windows-vs2022.dockerfile index c15970ca9b4..04750ff44c4 100644 --- a/ci/docker/python-wheel-windows-vs2022.dockerfile +++ b/ci/docker/python-wheel-windows-vs2022.dockerfile @@ -25,8 +25,9 @@ FROM ${base} ARG python=3.10 RUN (if "%python%"=="3.10" setx PYTHON_VERSION "3.10.11" && setx PYTHON_CMD "py -3.10") & \ (if "%python%"=="3.11" setx PYTHON_VERSION "3.11.9" && setx PYTHON_CMD "py -3.11") & \ - (if "%python%"=="3.12" setx PYTHON_VERSION "3.12.8" && setx PYTHON_CMD "py -3.12") & \ - (if "%python%"=="3.13" setx PYTHON_VERSION "3.13.1" && setx PYTHON_CMD "py -3.13") + (if "%python%"=="3.12" setx PYTHON_VERSION "3.12.10" && setx PYTHON_CMD "py -3.12") & \ + (if "%python%"=="3.13" setx PYTHON_VERSION "3.13.7" && setx PYTHON_CMD "py -3.13") & \ + (if "%python%"=="3.14" setx PYTHON_VERSION "3.14.0" && setx PYTHON_CMD "py -3.14") RUN choco install -r -y --pre --no-progress python --version=%PYTHON_VERSION% RUN %PYTHON_CMD% -m pip install -U pip setuptools diff --git a/ci/scripts/install_python.sh b/ci/scripts/install_python.sh index 915c58bbb47..fe0c4bcb931 100755 --- a/ci/scripts/install_python.sh +++ b/ci/scripts/install_python.sh @@ -27,9 +27,11 @@ platforms=([windows]=Windows declare -A versions versions=([3.10]=3.10.11 [3.11]=3.11.9 - [3.12]=3.12.9 - [3.13]=3.13.2 - [3.13t]=3.13.2) + [3.12]=3.12.10 + [3.13]=3.13.7 + [3.13t]=3.13.7 + [3.14]=3.14.0 + [3.14t]=3.14.0) if [ "$#" -ne 2 ]; then echo "Usage: $0 " @@ -50,7 +52,9 @@ if [ "$platform" = "macOS" ]; then wget "https://www.python.org/ftp/python/${full_version}/${fname}" echo "Installing Python..." - if [[ $2 == "3.13t" ]]; then + if [[ $2 == "3.13t" ]] || [[ $2 == "3.14t" ]]; then + # Extract the base version without 't' suffix + base_version="${version%t}" # See https://github.com/python/cpython/issues/120098#issuecomment-2151122033 for more info on this. cat > ./choicechanges.plist < @@ -63,7 +67,7 @@ if [ "$platform" = "macOS" ]; then choiceAttribute selected choiceIdentifier - org.python.Python.PythonTFramework-3.13 + org.python.Python.PythonTFramework-${base_version} @@ -76,8 +80,9 @@ EOF rm "$fname" python="/Library/Frameworks/Python.framework/Versions/${version}/bin/python${version}" - if [[ $2 == "3.13t" ]]; then - python="/Library/Frameworks/PythonT.framework/Versions/3.13/bin/python3.13t" + if [[ $2 == "3.13t" ]] || [[ $2 == "3.14t" ]]; then + base_version="${version%t}" + python="/Library/Frameworks/PythonT.framework/Versions/${base_version}/bin/python${base_version}t" fi echo "Installing Pip..." diff --git a/ci/scripts/python_wheel_unix_test.sh b/ci/scripts/python_wheel_unix_test.sh index e18c0c740ca..2b8ee7be745 100755 --- a/ci/scripts/python_wheel_unix_test.sh +++ b/ci/scripts/python_wheel_unix_test.sh @@ -31,9 +31,9 @@ source_dir=${1} : "${ARROW_AZURE:=ON}" : "${ARROW_FLIGHT:=ON}" : "${ARROW_GCS:=ON}" +: "${CHECK_IMPORTS:=ON}" : "${ARROW_S3:=ON}" : "${ARROW_SUBSTRAIT:=ON}" -: "${CHECK_IMPORTS:=ON}" : "${CHECK_WHEEL_CONTENT:=ON}" : "${CHECK_UNITTESTS:=ON}" : "${INSTALL_PYARROW:=ON}" @@ -106,10 +106,10 @@ is_free_threaded() { if [ "${CHECK_UNITTESTS}" == "ON" ]; then # Install testing dependencies - if [ "$(is_free_threaded)" = "ON" ]; then - echo "Free-threaded Python build detected" + if [ "$(is_free_threaded)" = "ON" ] && [[ "${PYTHON:-}" == *"3.13"* ]]; then + echo "Free-threaded Python 3.13 build detected" python -m pip install -U -r "${source_dir}/python/requirements-wheel-test-3.13t.txt" - elif [ "$(is_free_threaded)" = "OFF" ]; then + else echo "Regular Python build detected" python -m pip install -U -r "${source_dir}/python/requirements-wheel-test.txt" fi diff --git a/dev/release/verify-release-candidate.sh b/dev/release/verify-release-candidate.sh index e202c7b1e1e..56c671910f0 100755 --- a/dev/release/verify-release-candidate.sh +++ b/dev/release/verify-release-candidate.sh @@ -852,7 +852,7 @@ test_linux_wheels() { local arch="x86_64" fi - local python_versions="${TEST_PYTHON_VERSIONS:-3.10 3.11 3.12 3.13}" + local python_versions="${TEST_PYTHON_VERSIONS:-3.10 3.11 3.12 3.13 3.14}" local platform_tags="${TEST_WHEEL_PLATFORM_TAGS:-manylinux_2_28_${arch}}" if [ "${SOURCE_KIND}" != "local" ]; then @@ -891,11 +891,11 @@ test_macos_wheels() { # apple silicon processor if [ "$(uname -m)" = "arm64" ]; then - local python_versions="3.10 3.11 3.12 3.13" + local python_versions="3.10 3.11 3.12 3.13 3.14" local platform_tags="macosx_12_0_arm64" local check_flight=OFF else - local python_versions="3.10 3.11 3.12 3.13" + local python_versions="3.10 3.11 3.12 3.13 3.14" local platform_tags="macosx_12_0_x86_64" fi diff --git a/dev/tasks/python-wheels/github.linux.yml b/dev/tasks/python-wheels/github.linux.yml index 09822ed2ffc..871e044fa21 100644 --- a/dev/tasks/python-wheels/github.linux.yml +++ b/dev/tasks/python-wheels/github.linux.yml @@ -42,16 +42,25 @@ jobs: {% endif %} PYTHON: "{{ python_version }}" PYTHON_ABI_TAG: "{{ python_abi_tag }}" + {% if python_version == "3.14" %} + PYTHON_IMAGE_TAG: "3.14" + PYTHON_PATCH_VERSION: "3.14.0" + {% elif python_version == "3.13" %} PYTHON_IMAGE_TAG: "{{ python_version }}" + PYTHON_PATCH_VERSION: "3.13.7" + {% else %} + PYTHON_IMAGE_TAG: "{{ python_version }}" + {% endif %} steps: {{ macros.github_checkout_arrow()|indent }} {{ macros.github_install_archery()|indent }} {{ macros.github_login_dockerhub()|indent }} + # Detect free-threaded Python builds - name: Prepare run: | - if [ "${PYTHON_ABI_TAG}" = "cp313t" ]; then + if [[ "${PYTHON_ABI_TAG}" == *t ]]; then test_image_prefix=python-free-threaded else test_image_prefix=python diff --git a/dev/tasks/python-wheels/github.osx.yml b/dev/tasks/python-wheels/github.osx.yml index 140971626bf..ef8e90f4129 100644 --- a/dev/tasks/python-wheels/github.osx.yml +++ b/dev/tasks/python-wheels/github.osx.yml @@ -27,7 +27,7 @@ PYARROW_VERSION: "{{ arrow.no_rc_version }}" PYTHON_VERSION: "{{ python_version }}" PYTHON_ABI_TAG: "{{ python_abi_tag }}" - {% if python_abi_tag == "cp313t" %} + {% if python_abi_tag.endswith('t') %} PYTHON: "/Library/Frameworks/PythonT.framework/Versions/{{ python_version }}/bin/python{{ python_version }}t" {% else %} PYTHON: "/Library/Frameworks/Python.framework/Versions/{{ python_version }}/bin/python{{ python_version }}" @@ -94,7 +94,7 @@ jobs: --x-feature=s3 - name: Install Python {{ python_version }} - run: sudo arrow/ci/scripts/install_python.sh macos {{ "3.13t" if python_abi_tag == "cp313t" else python_version }} + run: sudo arrow/ci/scripts/install_python.sh macos {{ python_version + "t" if python_abi_tag.endswith('t') else python_version }} - name: Build Wheel run: | @@ -131,7 +131,7 @@ jobs: - name: Test Wheel env: PYTEST_ADDOPTS: "-k 'not test_cancellation'" - PYTHON_GIL: {{ 0 if python_abi_tag == "cp313t" else 1 }} + PYTHON_GIL: {{ 0 if python_abi_tag.endswith('t') else 1 }} run: | $PYTHON -m venv test-env source test-env/bin/activate diff --git a/dev/tasks/tasks.yml b/dev/tasks/tasks.yml index 6ac50421768..7f69d40dce6 100644 --- a/dev/tasks/tasks.yml +++ b/dev/tasks/tasks.yml @@ -218,7 +218,9 @@ tasks: ("3.11", "cp311", "cp311"), ("3.12", "cp312", "cp312"), ("3.13", "cp313", "cp313"), - ("3.13", "cp313", "cp313t")] %} + ("3.13", "cp313", "cp313t"), + ("3.14", "cp314", "cp314"), + ("3.14", "cp314", "cp314t")] %} {############################## Wheel Linux ##################################} @@ -806,7 +808,7 @@ tasks: UBUNTU: 22.04 image: ubuntu-cpp-emscripten -{% for python_version in ["3.10", "3.11", "3.12", "3.13"] %} +{% for python_version in ["3.10", "3.11", "3.12", "3.13", "3.14"] %} test-conda-python-{{ python_version }}: ci: github template: docker-tests/github.linux.yml diff --git a/docker-compose.yml b/docker-compose.yml index 6d3babd4311..1424fd7f208 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1144,7 +1144,7 @@ services: args: arch: ${ARCH} arch_short: ${ARCH_SHORT} - base: quay.io/pypa/manylinux_2_28_${ARCH_ALIAS}:2024-08-03-32dfa47 + base: quay.io/pypa/manylinux_2_28_${ARCH_ALIAS}:2025-06-04-496f7e1 manylinux: 2_28 python: ${PYTHON} python_abi_tag: ${PYTHON_ABI_TAG} @@ -1169,7 +1169,7 @@ services: args: arch: ${ARCH} arch_short: ${ARCH_SHORT} - base: quay.io/pypa/musllinux_1_2_${ARCH_ALIAS}:2025-01-18-a325f1d + base: quay.io/pypa/musllinux_1_2_${ARCH_ALIAS}:2025-06-04-496f7e1 musllinux: 1_2 python: ${PYTHON} python_abi_tag: ${PYTHON_ABI_TAG} @@ -1205,14 +1205,16 @@ services: # TODO: Remove this when the official Docker Python image supports the free-threaded build. # See https://github.com/docker-library/python/issues/947 for more info. python-free-threaded-wheel-musllinux-test-imports: - image: ${REPO}:${ARCH}-python-3.13-free-threaded-wheel-musllinux-test-imports + image: ${REPO}:${ARCH}-python-${PYTHON_IMAGE_TAG}-free-threaded-wheel-musllinux-test-imports build: args: base: "${ARCH}/alpine:${ALPINE_LINUX}" + python_version: ${PYTHON} + python_patch_version: ${PYTHON_PATCH_VERSION} context: . dockerfile: ci/docker/python-free-threaded-wheel-musllinux-test-imports.dockerfile cache_from: - - ${REPO}:${ARCH}-python-3.13-free-threaded-wheel-musllinux-test-imports + - ${REPO}:${ARCH}-python-${PYTHON_IMAGE_TAG}-free-threaded-wheel-musllinux-test-imports shm_size: 2G volumes: - .:/arrow:delegated @@ -1220,6 +1222,7 @@ services: <<: *common CHECK_IMPORTS: "ON" CHECK_UNITTESTS: "OFF" + PYTHON: ${PYTHON} command: /arrow/ci/scripts/python_wheel_unix_test.sh /arrow python-wheel-musllinux-test-unittests: @@ -1245,14 +1248,16 @@ services: # TODO: Remove this when the official Docker Python image supports the free-threaded build. # See https://github.com/docker-library/python/issues/947 for more info. python-free-threaded-wheel-musllinux-test-unittests: - image: ${REPO}:${ARCH}-python-3.13-free-threaded-wheel-musllinux-test-unittests + image: ${REPO}:${ARCH}-python-${PYTHON_IMAGE_TAG}-free-threaded-wheel-musllinux-test-unittests build: args: base: "${ARCH}/alpine:${ALPINE_LINUX}" + python_version: ${PYTHON} + python_patch_version: ${PYTHON_PATCH_VERSION} context: . dockerfile: ci/docker/python-free-threaded-wheel-musllinux-test-unittests.dockerfile cache_from: - - ${REPO}:${ARCH}-python-3.13-free-threaded-wheel-musllinux-test-unittests + - ${REPO}:${ARCH}-python-${PYTHON_IMAGE_TAG}-free-threaded-wheel-musllinux-test-unittests shm_size: 2G volumes: - .:/arrow:delegated @@ -1260,6 +1265,7 @@ services: <<: *common CHECK_IMPORTS: "OFF" CHECK_UNITTESTS: "ON" + PYTHON: ${PYTHON} command: /arrow/ci/scripts/python_wheel_unix_test.sh /arrow python-wheel-manylinux-test-imports: @@ -1277,14 +1283,15 @@ services: # TODO: Remove this when the official Docker Python image supports the free-threaded build. # See https://github.com/docker-library/python/issues/947 for more info. python-free-threaded-wheel-manylinux-test-imports: - image: ${REPO}:${ARCH}-python-3.13-free-threaded-wheel-manylinux-test-imports + image: ${REPO}:${ARCH}-python-${PYTHON_IMAGE_TAG}-free-threaded-wheel-manylinux-test-imports build: args: base: "${ARCH}/ubuntu:${UBUNTU}" + python_version: ${PYTHON} context: . dockerfile: ci/docker/python-free-threaded-wheel-manylinux-test-imports.dockerfile cache_from: - - ${REPO}:${ARCH}-python-3.13-free-threaded-wheel-manylinux-test-imports + - ${REPO}:${ARCH}-python-${PYTHON_IMAGE_TAG}-free-threaded-wheel-manylinux-test-imports shm_size: 2G volumes: - .:/arrow:delegated @@ -1292,6 +1299,7 @@ services: <<: *common CHECK_IMPORTS: "ON" CHECK_UNITTESTS: "OFF" + PYTHON: ${PYTHON} command: /arrow/ci/scripts/python_wheel_unix_test.sh /arrow python-wheel-manylinux-test-unittests: @@ -1318,14 +1326,15 @@ services: # TODO: Remove this when the official Docker Python image supports the free-threaded build. # See https://github.com/docker-library/python/issues/947 for more info. python-free-threaded-wheel-manylinux-test-unittests: - image: ${REPO}:${ARCH}-python-3.13-free-threaded-wheel-manylinux-test-unittests + image: ${REPO}:${ARCH}-python-${PYTHON_IMAGE_TAG}-free-threaded-wheel-manylinux-test-unittests build: args: base: "${ARCH}/ubuntu:${UBUNTU}" + python_version: ${PYTHON} context: . dockerfile: ci/docker/python-free-threaded-wheel-manylinux-test-unittests.dockerfile cache_from: - - ${REPO}:${ARCH}-python-3.13-free-threaded-wheel-manylinux-test-unittests + - ${REPO}:${ARCH}-python-${PYTHON_IMAGE_TAG}-free-threaded-wheel-manylinux-test-unittests shm_size: 2G volumes: - .:/arrow:delegated @@ -1333,6 +1342,7 @@ services: <<: *common CHECK_IMPORTS: "OFF" CHECK_UNITTESTS: "ON" + PYTHON: ${PYTHON} command: /arrow/ci/scripts/python_wheel_unix_test.sh /arrow python-wheel-windows-vs2022-base: @@ -1407,6 +1417,7 @@ services: build: args: base: ${REPO}:python-wheel-windows-test-vs2022-base-${PYTHON_WHEEL_WINDOWS_TEST_IMAGE_REVISION} + python: ${PYTHON} context: . dockerfile: ci/docker/python-free-threaded-wheel-windows-test-vs2022.dockerfile volumes: *python-wheel-windows-vs2022-volumes diff --git a/python/pyarrow/tests/test_array.py b/python/pyarrow/tests/test_array.py index 009ab1e849b..ec361159c5f 100644 --- a/python/pyarrow/tests/test_array.py +++ b/python/pyarrow/tests/test_array.py @@ -292,10 +292,12 @@ def test_to_pandas_zero_copy(): for i in range(10): series = arr.to_pandas() - assert sys.getrefcount(series) == 2 + # In Python 3.14 interpreter might avoid some + # reference count modifications + assert sys.getrefcount(series) in (1, 2) series = None # noqa - assert sys.getrefcount(arr) == 2 + assert sys.getrefcount(arr) in (1, 2) for i in range(10): arr = pa.array(range(10)) diff --git a/python/pyproject.toml b/python/pyproject.toml index fac3b25c554..240db14dc72 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -39,6 +39,8 @@ classifiers = [ 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3.12', 'Programming Language :: Python :: 3.13', + 'Programming Language :: Python :: 3.14', + 'Programming Language :: Python :: Free Threading :: 2 - Beta', ] 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 06c059f591f..b2ff4553b45 100644 --- a/python/requirements-wheel-test.txt +++ b/python/requirements-wheel-test.txt @@ -15,6 +15,7 @@ tzdata; sys_platform == 'win32' numpy~=1.21.3; python_version < "3.11" numpy~=1.23.2; python_version == "3.11" numpy~=1.26.0; python_version == "3.12" -numpy~=2.1.0; python_version >= "3.13" +numpy~=2.1.0; python_version == "3.13" +numpy~=2.3.3; python_version >= "3.14" pandas