From 929d4e0c478c837993497566dab1cd95d99d2b8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Thu, 5 Sep 2024 11:04:31 +0200 Subject: [PATCH 01/21] GH-43518: [Python][Packaging][CI] Drop Python 3.8 support --- .env | 4 +- .github/workflows/go.yml | 4 +- .github/workflows/integration.yml | 2 +- .github/workflows/java.yml | 2 +- .github/workflows/java_jni.yml | 4 +- .github/workflows/js.yml | 2 +- .github/workflows/python.yml | 50 +++++++++---------- .github/workflows/r.yml | 4 +- .github/workflows/ruby.yml | 2 +- .../conda-python-cpython-debug.dockerfile | 4 +- ci/docker/conda-python-cython2.dockerfile | 2 +- ci/docker/conda-python-dask.dockerfile | 2 +- ci/docker/conda-python-hdfs.dockerfile | 2 +- ci/docker/conda-python-jpype.dockerfile | 2 +- ci/docker/conda-python-pandas.dockerfile | 2 +- ci/docker/conda-python-spark.dockerfile | 2 +- ci/docker/conda-python.dockerfile | 2 +- ci/docker/python-wheel-manylinux.dockerfile | 4 +- ...ython-wheel-windows-test-vs2019.dockerfile | 9 ++-- .../python-wheel-windows-vs2019.dockerfile | 9 ++-- ci/scripts/install_python.sh | 5 +- ci/scripts/r_install_system_dependencies.sh | 2 +- dev/archery/setup.py | 10 ++-- .../verify-release-candidate-wheels.bat | 9 ++-- dev/release/verify-release-candidate.bat | 2 +- dev/release/verify-release-candidate.sh | 6 +-- dev/tasks/macros.jinja | 2 +- dev/tasks/python-wheels/github.linux.yml | 4 +- dev/tasks/tasks.yml | 15 +++--- docker-compose.yml | 2 +- .../continuous_integration/archery.rst | 2 +- .../continuous_integration/crossbow.rst | 2 +- docs/source/python/install.rst | 2 +- python/asv.conf.json | 2 +- python/pyarrow/tests/test_types.py | 11 ++-- python/pyarrow/tests/util.py | 12 +---- python/pyproject.toml | 3 +- r/tests/testthat/test-python.R | 4 +- 38 files changed, 95 insertions(+), 114 deletions(-) diff --git a/.env b/.env index c8c236d5ac44b..6accb27262eef 100644 --- a/.env +++ b/.env @@ -70,8 +70,8 @@ NODE=18 NUMBA=latest NUMPY=latest PANDAS=latest -PYTHON=3.8 -PYTHON_IMAGE_TAG=3.8 +PYTHON=3.9 +PYTHON_IMAGE_TAG=3.9 R=4.4 SPARK=master TURBODBC=latest diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index d463549206471..ba97371b9fdda 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -211,7 +211,7 @@ jobs: - name: Setup Python uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 with: - python-version: 3.8 + python-version: 3.9 - name: Setup Archery run: pip install -e dev/archery[docker] - name: Execute Docker Build @@ -251,7 +251,7 @@ jobs: - name: Setup Python uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 with: - python-version: 3.8 + python-version: 3.9 - name: Setup Archery run: pip install -e dev/archery[docker] - name: Execute Docker Build diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index b73f900e616f5..0b073e6cfb1c0 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -93,7 +93,7 @@ jobs: - name: Setup Python uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 with: - python-version: 3.8 + python-version: 3.9 - name: Setup Archery run: pip install -e dev/archery[docker] - name: Execute Docker Build diff --git a/.github/workflows/java.yml b/.github/workflows/java.yml index 57f834bcbabee..b2c76b49fddd9 100644 --- a/.github/workflows/java.yml +++ b/.github/workflows/java.yml @@ -80,7 +80,7 @@ jobs: - name: Setup Python uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 with: - python-version: 3.8 + python-version: 3.9 - name: Setup Archery run: pip install -e dev/archery[docker] - name: Execute Docker Build diff --git a/.github/workflows/java_jni.yml b/.github/workflows/java_jni.yml index e730a5bf3e672..aea5b0b2efaaf 100644 --- a/.github/workflows/java_jni.yml +++ b/.github/workflows/java_jni.yml @@ -74,7 +74,7 @@ jobs: - name: Setup Python uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 with: - python-version: 3.8 + python-version: 3.9 - name: Setup Archery run: pip install -e dev/archery[docker] - name: Execute Docker Build @@ -116,7 +116,7 @@ jobs: - name: Setup Python uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 with: - python-version: 3.8 + python-version: 3.9 - name: Setup Archery run: pip install -e dev/archery[docker] - name: Execute Docker Build diff --git a/.github/workflows/js.yml b/.github/workflows/js.yml index 9ab4edf0851cd..c49fc0bbd81dd 100644 --- a/.github/workflows/js.yml +++ b/.github/workflows/js.yml @@ -58,7 +58,7 @@ jobs: - name: Setup Python uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 with: - python-version: 3.8 + python-version: 3.9 - name: Setup Archery run: pip install -e dev/archery[docker] - name: Execute Docker Build diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 45efd305aa8f6..dfaae9095d06c 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -58,41 +58,41 @@ jobs: matrix: name: - conda-python-docs - - conda-python-3.9-nopandas - - conda-python-3.8-pandas-1.0 - - conda-python-3.10-pandas-latest - - conda-python-3.10-no-numpy + - conda-python-3.10-nopandas + - conda-python-3.9-pandas-1.0 + - conda-python-3.11-pandas-latest + - conda-python-3.11-no-numpy include: - name: conda-python-docs - cache: conda-python-3.9 + cache: conda-python-3.10 image: conda-python-docs - title: AMD64 Conda Python 3.9 Sphinx & Numpydoc - python: 3.9 - - name: conda-python-3.9-nopandas - cache: conda-python-3.9 + title: AMD64 Conda Python 3.10 Sphinx & Numpydoc + python: 3.10 + - name: conda-python-3.10-nopandas + cache: conda-python-3.10 image: conda-python - title: AMD64 Conda Python 3.9 Without Pandas - python: 3.9 - - name: conda-python-3.8-pandas-1.0 - cache: conda-python-3.8 + title: AMD64 Conda Python 3.10 Without Pandas + python: 3.10 + - name: conda-python-3.9-pandas-1.0 + cache: conda-python-3.9 image: conda-python-pandas - title: AMD64 Conda Python 3.8 Pandas 1.0 - python: 3.8 + title: AMD64 Conda Python 3.9 Pandas 1.0 + python: 3.9 pandas: "1.0" numpy: 1.16 - - name: conda-python-3.10-pandas-latest - cache: conda-python-3.10 + - name: conda-python-3.11-pandas-latest + cache: conda-python-3.11 image: conda-python-pandas - title: AMD64 Conda Python 3.10 Pandas latest - python: "3.10" + title: AMD64 Conda Python 3.11 Pandas latest + python: "3.11" pandas: latest - - name: conda-python-3.10-no-numpy - cache: conda-python-3.10 + - name: conda-python-3.11-no-numpy + cache: conda-python-3.11 image: conda-python-no-numpy - title: AMD64 Conda Python 3.10 without NumPy - python: "3.10" + title: AMD64 Conda Python 3.11 without NumPy + python: "3.11" env: - PYTHON: ${{ matrix.python || 3.8 }} + PYTHON: ${{ matrix.python || 3.9 }} UBUNTU: ${{ matrix.ubuntu || 20.04 }} PANDAS: ${{ matrix.pandas || 'latest' }} NUMPY: ${{ matrix.numpy || 'latest' }} @@ -111,7 +111,7 @@ jobs: - name: Setup Python uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 with: - python-version: 3.8 + python-version: 3.9 - name: Setup Archery run: pip install -e dev/archery[docker] - name: Execute Docker Build diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml index f7e661633626b..18a67550a1812 100644 --- a/.github/workflows/r.yml +++ b/.github/workflows/r.yml @@ -150,7 +150,7 @@ jobs: - name: Setup Python uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 with: - python-version: 3.8 + python-version: 3.9 - name: Setup Archery run: pip install -e dev/archery[docker] - name: Execute Docker Build @@ -209,7 +209,7 @@ jobs: - name: Setup Python uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 with: - python-version: 3.8 + python-version: 3.9 - name: Setup Archery run: pip install -e dev/archery[docker] - name: Execute Docker Build diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 05b7b317ffd96..16c0b84bb43ab 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -87,7 +87,7 @@ jobs: - name: Setup Python uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 with: - python-version: 3.8 + python-version: 3.9 - name: Setup Archery run: pip install -e dev/archery[docker] - name: Execute Docker Build diff --git a/ci/docker/conda-python-cpython-debug.dockerfile b/ci/docker/conda-python-cpython-debug.dockerfile index 87bdcafe4092a..36ba7865a888c 100644 --- a/ci/docker/conda-python-cpython-debug.dockerfile +++ b/ci/docker/conda-python-cpython-debug.dockerfile @@ -17,11 +17,11 @@ ARG repo ARG arch -ARG python=3.8 +ARG python=3.9 FROM ${repo}:${arch}-conda-python-${python} # (Docker oddity: ARG needs to be repeated after FROM) -ARG python=3.8 +ARG python=3.9 RUN mamba install -y "conda-forge/label/python_debug::python=${python}[build=*_cpython]" && \ mamba clean --all # Quick check that we do have a debug mode CPython diff --git a/ci/docker/conda-python-cython2.dockerfile b/ci/docker/conda-python-cython2.dockerfile index d67ef677276c7..859ad868b0c71 100644 --- a/ci/docker/conda-python-cython2.dockerfile +++ b/ci/docker/conda-python-cython2.dockerfile @@ -17,7 +17,7 @@ ARG repo ARG arch -ARG python=3.8 +ARG python=3.9 FROM ${repo}:${arch}-conda-python-${python} RUN mamba install -q -y "cython<3" && \ diff --git a/ci/docker/conda-python-dask.dockerfile b/ci/docker/conda-python-dask.dockerfile index 44840110817e9..2c063b2e643b6 100644 --- a/ci/docker/conda-python-dask.dockerfile +++ b/ci/docker/conda-python-dask.dockerfile @@ -17,7 +17,7 @@ ARG repo ARG arch=amd64 -ARG python=3.8 +ARG python=3.9 FROM ${repo}:${arch}-conda-python-${python} ARG dask=latest diff --git a/ci/docker/conda-python-hdfs.dockerfile b/ci/docker/conda-python-hdfs.dockerfile index 4e5e1a402e282..4cf35f4b37a56 100644 --- a/ci/docker/conda-python-hdfs.dockerfile +++ b/ci/docker/conda-python-hdfs.dockerfile @@ -17,7 +17,7 @@ ARG repo ARG arch=amd64 -ARG python=3.8 +ARG python=3.9 FROM ${repo}:${arch}-conda-python-${python} ARG jdk=11 diff --git a/ci/docker/conda-python-jpype.dockerfile b/ci/docker/conda-python-jpype.dockerfile index d9b43afdaec9e..c28400f0262da 100644 --- a/ci/docker/conda-python-jpype.dockerfile +++ b/ci/docker/conda-python-jpype.dockerfile @@ -17,7 +17,7 @@ ARG repo ARG arch=amd64 -ARG python=3.8 +ARG python=3.9 FROM ${repo}:${arch}-conda-python-${python} ARG jdk=11 diff --git a/ci/docker/conda-python-pandas.dockerfile b/ci/docker/conda-python-pandas.dockerfile index 83ad52a13d639..9ee62cd282d36 100644 --- a/ci/docker/conda-python-pandas.dockerfile +++ b/ci/docker/conda-python-pandas.dockerfile @@ -17,7 +17,7 @@ ARG repo ARG arch=amd64 -ARG python=3.8 +ARG python=3.9 FROM ${repo}:${arch}-conda-python-${python} ARG pandas=latest diff --git a/ci/docker/conda-python-spark.dockerfile b/ci/docker/conda-python-spark.dockerfile index d95fe58b529f6..a8e8250797fa8 100644 --- a/ci/docker/conda-python-spark.dockerfile +++ b/ci/docker/conda-python-spark.dockerfile @@ -17,7 +17,7 @@ ARG repo ARG arch=amd64 -ARG python=3.8 +ARG python=3.9 FROM ${repo}:${arch}-conda-python-${python} ARG jdk=11 diff --git a/ci/docker/conda-python.dockerfile b/ci/docker/conda-python.dockerfile index 7e8dbe76f6248..3897a7217d975 100644 --- a/ci/docker/conda-python.dockerfile +++ b/ci/docker/conda-python.dockerfile @@ -20,7 +20,7 @@ ARG arch FROM ${repo}:${arch}-conda-cpp # install python specific packages -ARG python=3.8 +ARG python=3.9 COPY ci/conda_env_python.txt \ /arrow/ci/ # If the Python version being tested is the same as the Python used by the system gdb, diff --git a/ci/docker/python-wheel-manylinux.dockerfile b/ci/docker/python-wheel-manylinux.dockerfile index 5cc1711608c03..a797bedff166a 100644 --- a/ci/docker/python-wheel-manylinux.dockerfile +++ b/ci/docker/python-wheel-manylinux.dockerfile @@ -47,7 +47,7 @@ RUN dnf install -y git flex curl autoconf zip perl-IPC-Cmd wget # on manylinux_2_28, no system python is installed. # We therefore override the PATH with Python 3.8 in /opt/python # so that we have a consistent Python version across base images. -ENV CPYTHON_VERSION=cp38 +ENV CPYTHON_VERSION=cp39 ENV PATH=/opt/python/${CPYTHON_VERSION}-${CPYTHON_VERSION}/bin:${PATH} # Install CMake @@ -104,7 +104,7 @@ RUN vcpkg install \ RUN pipx upgrade auditwheel # Configure Python for applications running in the bash shell of this Dockerfile -ARG python=3.8 +ARG python=3.9 ENV PYTHON_VERSION=${python} 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 diff --git a/ci/docker/python-wheel-windows-test-vs2019.dockerfile b/ci/docker/python-wheel-windows-test-vs2019.dockerfile index bffc1bd13d6b7..8c17ebfa2fe0a 100644 --- a/ci/docker/python-wheel-windows-test-vs2019.dockerfile +++ b/ci/docker/python-wheel-windows-test-vs2019.dockerfile @@ -48,13 +48,12 @@ COPY ci/scripts/install_gcs_testbench.bat C:/arrow/ci/scripts/ RUN call "C:\arrow\ci\scripts\install_gcs_testbench.bat" && \ storage-testbench -h -# Define the full version number otherwise choco falls back to patch number 0 (3.8 => 3.8.0) -ARG python=3.8 -RUN (if "%python%"=="3.8" setx PYTHON_VERSION "3.8.10") & \ - (if "%python%"=="3.9" setx PYTHON_VERSION "3.9.13") & \ +# Define the full version number otherwise choco falls back to patch number 0 (3.9 => 3.9.0) +ARG python=3.9 +RUN (if "%python%"=="3.9" setx PYTHON_VERSION "3.9.13") & \ (if "%python%"=="3.10" setx PYTHON_VERSION "3.10.11") & \ (if "%python%"=="3.11" setx PYTHON_VERSION "3.11.9") & \ - (if "%python%"=="3.12" setx PYTHON_VERSION "3.12.4") & \ + (if "%python%"=="3.12" setx PYTHON_VERSION "3.12.5") & \ (if "%python%"=="3.13" setx PYTHON_VERSION "3.13.0-rc1") # Install archiver to extract xz archives diff --git a/ci/docker/python-wheel-windows-vs2019.dockerfile b/ci/docker/python-wheel-windows-vs2019.dockerfile index 5a17e3e4c52c2..f9d31eb5771ef 100644 --- a/ci/docker/python-wheel-windows-vs2019.dockerfile +++ b/ci/docker/python-wheel-windows-vs2019.dockerfile @@ -78,13 +78,12 @@ RUN vcpkg install \ RUN wmic product where "name like 'python%%'" call uninstall /nointeractive && \ rm -rf Python* -# Define the full version number otherwise choco falls back to patch number 0 (3.8 => 3.8.0) -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") & \ +# Define the full version number otherwise choco falls back to patch number 0 (3.9 => 3.9.0) +ARG python=3.9 +RUN (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.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.12" setx PYTHON_VERSION "3.12.5" && 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 --pre --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 42d0e9ca179fb..25c0dc1c024f7 100755 --- a/ci/scripts/install_python.sh +++ b/ci/scripts/install_python.sh @@ -25,11 +25,10 @@ platforms=([windows]=Windows [linux]=Linux) declare -A versions -versions=([3.8]=3.8.10 - [3.9]=3.9.13 +versions=([3.9]=3.9.13 [3.10]=3.10.11 [3.11]=3.11.9 - [3.12]=3.12.4 + [3.12]=3.12.5 [3.13]=3.13.0) if [ "$#" -ne 2 ]; then diff --git a/ci/scripts/r_install_system_dependencies.sh b/ci/scripts/r_install_system_dependencies.sh index 7ddc2604f661a..ae2a04656c528 100755 --- a/ci/scripts/r_install_system_dependencies.sh +++ b/ci/scripts/r_install_system_dependencies.sh @@ -54,7 +54,7 @@ if [ "$ARROW_S3" == "ON" ] || [ "$ARROW_GCS" == "ON" ] || [ "$ARROW_R_DEV" == "T case "$PACKAGE_MANAGER" in zypper) # python3 is Python 3.6 on OpenSUSE 15.3. - # PyArrow supports Python 3.8 or later. + # PyArrow supports Python 3.9 or later. $PACKAGE_MANAGER install -y python39-pip ln -s /usr/bin/python3.9 /usr/local/bin/python ln -s /usr/bin/pip3.9 /usr/local/bin/pip diff --git a/dev/archery/setup.py b/dev/archery/setup.py index f87316dcc7ab9..59e6b5ca38e8c 100755 --- a/dev/archery/setup.py +++ b/dev/archery/setup.py @@ -21,12 +21,8 @@ import sys from setuptools import setup, find_packages -# pygit2>=1.14.0 requires python 3.9, so crossbow and all -# both technically require python 3.9 — however we still need to -# support 3.8 when using docker. When 3.8 is EOLed and we bump -# to Python 3.9 this will resolve itself. -if sys.version_info < (3, 8): - sys.exit('Python < 3.8 is not supported') +if sys.version_info < (3, 9): + sys.exit('Python < 3.9 is not supported') # For pathlib.Path compatibility jinja_req = 'jinja2>=2.11' @@ -57,7 +53,7 @@ maintainer_email='dev@arrow.apache.org', packages=find_packages(), include_package_data=True, - python_requires='>=3.8', + python_requires='>=3.9', install_requires=['click>=7'], tests_require=['pytest', 'responses'], extras_require=extras, diff --git a/dev/release/verify-release-candidate-wheels.bat b/dev/release/verify-release-candidate-wheels.bat index 06deb0c5b2260..d846b69da803b 100644 --- a/dev/release/verify-release-candidate-wheels.bat +++ b/dev/release/verify-release-candidate-wheels.bat @@ -57,9 +57,6 @@ call deactivate set ARROW_TEST_DATA=%cd%\arrow\testing\data -CALL :verify_wheel 3.8 -if errorlevel 1 GOTO error - CALL :verify_wheel 3.9 if errorlevel 1 GOTO error @@ -69,6 +66,12 @@ if errorlevel 1 GOTO error CALL :verify_wheel 3.11 if errorlevel 1 GOTO error +CALL :verify_wheel 3.12 +if errorlevel 1 GOTO error + +CALL :verify_wheel 3.13 +if errorlevel 1 GOTO error + :done cd %_CURRENT_DIR% diff --git a/dev/release/verify-release-candidate.bat b/dev/release/verify-release-candidate.bat index 06d3016c72af9..bba62b9c01273 100644 --- a/dev/release/verify-release-candidate.bat +++ b/dev/release/verify-release-candidate.bat @@ -56,7 +56,7 @@ if "%VERSION%"=="" ( set ARROW_TEST_DATA=!ARROW_SOURCE!\testing\data set PARQUET_TEST_DATA=!ARROW_SOURCE!\cpp\submodules\parquet-testing\data -set PYTHON=3.8 +set PYTHON=3.9 @rem Using call with conda.bat seems necessary to avoid terminating the batch @rem script execution diff --git a/dev/release/verify-release-candidate.sh b/dev/release/verify-release-candidate.sh index cdea4ca0d00a1..8aaffb591b0cf 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 3.13}" + local python_versions="${TEST_PYTHON_VERSIONS:-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 3.13" + local python_versions="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 3.13" + local python_versions="3.9 3.10 3.11 3.12 3.13" local platform_tags="macosx_10_15_x86_64" fi diff --git a/dev/tasks/macros.jinja b/dev/tasks/macros.jinja index 082d33b124f9f..4c504a120daed 100644 --- a/dev/tasks/macros.jinja +++ b/dev/tasks/macros.jinja @@ -211,7 +211,7 @@ env: {%- macro azure_upload_releases(pattern) -%} - task: UsePythonVersion@0 inputs: - versionSpec: '3.8' + versionSpec: '3.9' - script: pip install -e arrow/dev/archery[crossbow-upload] displayName: Install Crossbow - bash: | diff --git a/dev/tasks/python-wheels/github.linux.yml b/dev/tasks/python-wheels/github.linux.yml index faca698b71a4d..f3011ae118a11 100644 --- a/dev/tasks/python-wheels/github.linux.yml +++ b/dev/tasks/python-wheels/github.linux.yml @@ -66,7 +66,7 @@ jobs: - name: Test wheel on AlmaLinux 8 shell: bash if: | - '{{ python_version }}' == '3.8' + '{{ python_version }}' == '3.9' env: ALMALINUX: "8" run: | @@ -82,7 +82,7 @@ jobs: - name: Test wheel on Ubuntu 20.04 shell: bash if: | - '{{ python_version }}' == '3.8' + '{{ python_version }}' == '3.9' env: UBUNTU: "20.04" run: | diff --git a/dev/tasks/tasks.yml b/dev/tasks/tasks.yml index 9bb7eedd7b3ee..785af490c84a4 100644 --- a/dev/tasks/tasks.yml +++ b/dev/tasks/tasks.yml @@ -390,8 +390,7 @@ tasks: - pyarrow-{no_rc_version}-py310(h[a-z0-9]+)_0_cuda.conda - pyarrow-{no_rc_version}-py311(h[a-z0-9]+)_0_cuda.conda -{% for python_version, python_tag, abi_tag in [("3.8", "cp38", "cp38"), - ("3.9", "cp39", "cp39"), +{% for python_version, python_tag, abi_tag in [("3.9", "cp39", "cp39"), ("3.10", "cp310", "cp310"), ("3.11", "cp311", "cp311"), ("3.12", "cp312", "cp312"), @@ -1203,7 +1202,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.9", "3.10", "3.11", "3.12"] %} test-conda-python-{{ python_version }}: ci: github template: docker-tests/github.linux.yml @@ -1542,12 +1541,12 @@ tasks: ############################## Integration tests ############################ -{% for python_version, pandas_version, numpy_version, cache_leaf in [("3.8", "1.0", "1.19", True), - ("3.9", "latest", "latest", False), - ("3.10", "latest", "1.26", False), +{% for python_version, pandas_version, numpy_version, cache_leaf in [("3.9", "1.0", "1.19", True), ("3.10", "latest", "latest", False), - ("3.10", "nightly", "nightly", False), - ("3.11", "upstream_devel", "nightly", False)] %} + ("3.11", "latest", "1.26", False), + ("3.11", "latest", "latest", False), + ("3.11", "nightly", "nightly", False), + ("3.12", "upstream_devel", "nightly", False)] %} test-conda-python-{{ python_version }}-pandas-{{ pandas_version }}-numpy-{{ numpy_version }}: ci: github template: docker-tests/github.linux.yml diff --git a/docker-compose.yml b/docker-compose.yml index 6d9b738d8da35..9b0b6266f275a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -855,7 +855,7 @@ services: # docker-compose run --rm conda-python # Parameters: # ARCH: amd64, arm32v7 - # PYTHON: 3.8, 3.9, 3.10, 3.11 + # PYTHON: 3.9, 3.10, 3.11, 3.12 image: ${REPO}:${ARCH}-conda-python-${PYTHON} build: context: . diff --git a/docs/source/developers/continuous_integration/archery.rst b/docs/source/developers/continuous_integration/archery.rst index d190a0a96cfcb..2580693480ef1 100644 --- a/docs/source/developers/continuous_integration/archery.rst +++ b/docs/source/developers/continuous_integration/archery.rst @@ -26,7 +26,7 @@ utility called Archery. Installation ------------ -Archery requires Python 3.8 or later. It is recommended to install Archery in +Archery requires Python 3.9 or later. It is recommended to install Archery in *editable* mode with the ``-e`` flag to automatically update the installation when pulling the Arrow repository. After cloning the Arrow repository, from the top level directory install Archery by using the command diff --git a/docs/source/developers/continuous_integration/crossbow.rst b/docs/source/developers/continuous_integration/crossbow.rst index 50ac607f4d87b..44f41895d4faf 100644 --- a/docs/source/developers/continuous_integration/crossbow.rst +++ b/docs/source/developers/continuous_integration/crossbow.rst @@ -119,7 +119,7 @@ to step 3: - Confirm the `auto cancellation`_ feature is turned off for branch builds. This should be the default setting. -7. Install Python (minimum supported version is 3.8): +7. Install Python (minimum supported version is 3.9): | Miniconda is preferred, see installation instructions: | https://conda.io/docs/user-guide/install/index.html diff --git a/docs/source/python/install.rst b/docs/source/python/install.rst index 84d6253691f09..9727a68f7424b 100644 --- a/docs/source/python/install.rst +++ b/docs/source/python/install.rst @@ -27,7 +27,7 @@ Linux distributions. We strongly recommend using a 64-bit system. Python Compatibility -------------------- -PyArrow is currently compatible with Python 3.8, 3.9, 3.10 and 3.11. +PyArrow is currently compatible with Python 3.9, 3.10, 3.11, 3.12 and 3.13. Using Conda ----------- diff --git a/python/asv.conf.json b/python/asv.conf.json index 4d8d73e34b778..86fcd3537dc91 100644 --- a/python/asv.conf.json +++ b/python/asv.conf.json @@ -65,7 +65,7 @@ // The Pythons you'd like to test against. If not provided, defaults // to the current version of Python used to run `asv`. - "pythons": ["3.8"], + "pythons": ["3.9"], // The matrix of dependencies to test. Each key is the name of a // package (in PyPI) and the values are version numbers. An empty diff --git a/python/pyarrow/tests/test_types.py b/python/pyarrow/tests/test_types.py index cc680939ac46a..2a05f87615074 100644 --- a/python/pyarrow/tests/test_types.py +++ b/python/pyarrow/tests/test_types.py @@ -383,13 +383,10 @@ def test_tzinfo_to_string_errors(): with pytest.raises(TypeError): pa.lib.tzinfo_to_string("Europe/Budapest") - if sys.version_info >= (3, 8): - # before 3.8 it was only possible to create timezone objects with whole - # number of minutes - tz = datetime.timezone(datetime.timedelta(hours=1, seconds=30)) - msg = "Offset must represent whole number of minutes" - with pytest.raises(ValueError, match=msg): - pa.lib.tzinfo_to_string(tz) + tz = datetime.timezone(datetime.timedelta(hours=1, seconds=30)) + msg = "Offset must represent whole number of minutes" + with pytest.raises(ValueError, match=msg): + pa.lib.tzinfo_to_string(tz) if tzst: diff --git a/python/pyarrow/tests/util.py b/python/pyarrow/tests/util.py index aa6dd21f800c5..558d9a621c23e 100644 --- a/python/pyarrow/tests/util.py +++ b/python/pyarrow/tests/util.py @@ -310,17 +310,7 @@ def open_append_stream(self, path, metadata): def get_raise_signal(): - if sys.version_info >= (3, 8): - return signal.raise_signal - elif os.name == 'nt': - # On Windows, os.kill() doesn't actually send a signal, - # it just terminates the process with the given exit code. - pytest.skip("test requires Python 3.8+ on Windows") - else: - # On Unix, emulate raise_signal() with os.kill(). - def raise_signal(signum): - os.kill(os.getpid(), signum) - return raise_signal + return signal.raise_signal @contextlib.contextmanager diff --git a/python/pyproject.toml b/python/pyproject.toml index 7c3fcae5cb306..932210044399e 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -34,7 +34,7 @@ build-backend = "setuptools.build_meta" [project] name = "pyarrow" dynamic = ["version"] -requires-python = ">=3.8" +requires-python = ">=3.9" dependencies = [ "numpy >= 1.16.6" ] @@ -43,7 +43,6 @@ readme = {file = "README.md", content-type = "text/markdown"} license = {text = "Apache Software License"} classifiers = [ 'License :: OSI Approved :: Apache Software License', - 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', diff --git a/r/tests/testthat/test-python.R b/r/tests/testthat/test-python.R index c9dbd024855df..279a532003d54 100644 --- a/r/tests/testthat/test-python.R +++ b/r/tests/testthat/test-python.R @@ -22,8 +22,8 @@ test_that("install_pyarrow", { # Windows CI machine doesn't pick up the right python or something skip_on_os("windows") skip_if_not_installed("reticulate") - # PyArrow doesn't support Python 3.7 or earlier - skip_on_python_older_than("3.8") + # PyArrow doesn't support Python 3.8 or earlier + skip_on_python_older_than("3.9") # no pyarrow wheels for macos 10.13 skip_if(on_macos_10_13_or_lower()) From 6f1231a47a3d5c70c0640a4e128dda0da9662a5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Mon, 9 Sep 2024 11:03:59 +0200 Subject: [PATCH 02/21] Update 3.9 from GH setup-python to 3.x as suggested --- .github/workflows/go.yml | 4 ++-- .github/workflows/integration.yml | 2 +- .github/workflows/java.yml | 2 +- .github/workflows/java_jni.yml | 4 ++-- .github/workflows/js.yml | 2 +- .github/workflows/python.yml | 2 +- .github/workflows/r.yml | 4 ++-- .github/workflows/ruby.yml | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index ba97371b9fdda..7902fd6b22b7a 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -211,7 +211,7 @@ jobs: - name: Setup Python uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 with: - python-version: 3.9 + python-version: 3.x - name: Setup Archery run: pip install -e dev/archery[docker] - name: Execute Docker Build @@ -251,7 +251,7 @@ jobs: - name: Setup Python uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 with: - python-version: 3.9 + python-version: 3.x - name: Setup Archery run: pip install -e dev/archery[docker] - name: Execute Docker Build diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 0b073e6cfb1c0..f2f92bec914da 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -93,7 +93,7 @@ jobs: - name: Setup Python uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 with: - python-version: 3.9 + python-version: 3.x - name: Setup Archery run: pip install -e dev/archery[docker] - name: Execute Docker Build diff --git a/.github/workflows/java.yml b/.github/workflows/java.yml index b2c76b49fddd9..880c11a2d09b6 100644 --- a/.github/workflows/java.yml +++ b/.github/workflows/java.yml @@ -80,7 +80,7 @@ jobs: - name: Setup Python uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 with: - python-version: 3.9 + python-version: 3.x - name: Setup Archery run: pip install -e dev/archery[docker] - name: Execute Docker Build diff --git a/.github/workflows/java_jni.yml b/.github/workflows/java_jni.yml index aea5b0b2efaaf..12aaf63f369d7 100644 --- a/.github/workflows/java_jni.yml +++ b/.github/workflows/java_jni.yml @@ -74,7 +74,7 @@ jobs: - name: Setup Python uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 with: - python-version: 3.9 + python-version: 3.x - name: Setup Archery run: pip install -e dev/archery[docker] - name: Execute Docker Build @@ -116,7 +116,7 @@ jobs: - name: Setup Python uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 with: - python-version: 3.9 + python-version: 3.x - name: Setup Archery run: pip install -e dev/archery[docker] - name: Execute Docker Build diff --git a/.github/workflows/js.yml b/.github/workflows/js.yml index c49fc0bbd81dd..7790bf786f477 100644 --- a/.github/workflows/js.yml +++ b/.github/workflows/js.yml @@ -58,7 +58,7 @@ jobs: - name: Setup Python uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 with: - python-version: 3.9 + python-version: 3.x - name: Setup Archery run: pip install -e dev/archery[docker] - name: Execute Docker Build diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index dfaae9095d06c..f97c08611e15d 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -111,7 +111,7 @@ jobs: - name: Setup Python uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 with: - python-version: 3.9 + python-version: 3.x - name: Setup Archery run: pip install -e dev/archery[docker] - name: Execute Docker Build diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml index 18a67550a1812..b67b54c2afa31 100644 --- a/.github/workflows/r.yml +++ b/.github/workflows/r.yml @@ -150,7 +150,7 @@ jobs: - name: Setup Python uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 with: - python-version: 3.9 + python-version: 3.x - name: Setup Archery run: pip install -e dev/archery[docker] - name: Execute Docker Build @@ -209,7 +209,7 @@ jobs: - name: Setup Python uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 with: - python-version: 3.9 + python-version: 3.x - name: Setup Archery run: pip install -e dev/archery[docker] - name: Execute Docker Build diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 16c0b84bb43ab..f445be797461b 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -87,7 +87,7 @@ jobs: - name: Setup Python uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 with: - python-version: 3.9 + python-version: 3.x - name: Setup Archery run: pip install -e dev/archery[docker] - name: Execute Docker Build From a00ae82628a1be81d247c9920408c06991b53ffe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Mon, 9 Sep 2024 11:04:25 +0200 Subject: [PATCH 03/21] Use newer ubuntu to have Python > 3.8 for linting --- .github/workflows/dev.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index 3879a045fd239..d2436fe3c4525 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -66,6 +66,7 @@ jobs: env: ARCHERY_DOCKER_USER: ${{ secrets.DOCKERHUB_USER }} ARCHERY_DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }} + UBUNTU: 22.04 run: | source ci/scripts/util_enable_core_dumps.sh archery docker run -e GITHUB_ACTIONS=true ubuntu-lint From bdb884cf9171c07ff219d0b433b266c6f03f3c91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Mon, 9 Sep 2024 11:26:35 +0200 Subject: [PATCH 04/21] Add quotes to 3.10 and bump pandas to 1.5 --- .github/workflows/python.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index f97c08611e15d..308410d026f81 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -59,7 +59,7 @@ jobs: name: - conda-python-docs - conda-python-3.10-nopandas - - conda-python-3.9-pandas-1.0 + - conda-python-3.9-pandas-1.5 - conda-python-3.11-pandas-latest - conda-python-3.11-no-numpy include: @@ -67,18 +67,18 @@ jobs: cache: conda-python-3.10 image: conda-python-docs title: AMD64 Conda Python 3.10 Sphinx & Numpydoc - python: 3.10 + python: "3.10" - name: conda-python-3.10-nopandas cache: conda-python-3.10 image: conda-python title: AMD64 Conda Python 3.10 Without Pandas - python: 3.10 - - name: conda-python-3.9-pandas-1.0 + python: "3.10" + - name: conda-python-3.9-pandas-1.5 cache: conda-python-3.9 image: conda-python-pandas - title: AMD64 Conda Python 3.9 Pandas 1.0 + title: AMD64 Conda Python 3.9 Pandas 1.5 python: 3.9 - pandas: "1.0" + pandas: "1.5" numpy: 1.16 - name: conda-python-3.11-pandas-latest cache: conda-python-3.11 From c4b860b7da476f70382855f3558d70ff458410c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Mon, 9 Sep 2024 12:06:06 +0200 Subject: [PATCH 05/21] Bump Ubuntu on R job and bump numpy version --- .github/workflows/python.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 308410d026f81..8e80706fa8cde 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -79,7 +79,7 @@ jobs: title: AMD64 Conda Python 3.9 Pandas 1.5 python: 3.9 pandas: "1.5" - numpy: 1.16 + numpy: 1.24 - name: conda-python-3.11-pandas-latest cache: conda-python-3.11 image: conda-python-pandas From 9f158b47dcc08789efab11e11773b85cf06c5dee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Mon, 9 Sep 2024 15:39:22 +0200 Subject: [PATCH 06/21] Try installing Python manually if Ubuntu is 20.04 to update version --- ci/docker/linux-apt-python-3.dockerfile | 14 ++++++++++++++ ci/scripts/install_python.sh | 24 ++++++++++++++++++++++++ docker-compose.yml | 9 +++++++-- 3 files changed, 45 insertions(+), 2 deletions(-) diff --git a/ci/docker/linux-apt-python-3.dockerfile b/ci/docker/linux-apt-python-3.dockerfile index 2e07c244017a0..9130b5266633a 100644 --- a/ci/docker/linux-apt-python-3.dockerfile +++ b/ci/docker/linux-apt-python-3.dockerfile @@ -23,6 +23,20 @@ COPY python/requirements-build.txt \ /arrow/python/ ENV ARROW_PYTHON_VENV /arrow-dev + +ARG ubuntu +ARG python="3.12" +COPY ci/scripts/install_python.sh /arrow/ci/scripts/ +RUN if [ "${ubuntu}" = "20.04" ]; then \ + quiet=$([ "${DEBUG}" = "yes" ] || echo "-qq") && \ + apt update ${quiet} && \ + apt install -y -V ${quiet} \ + xz-utils && \ + apt clean && \ + rm -rf /var/lib/apt/lists/* && \ + /arrow/ci/scripts/install_python.sh linux ${python} \ + ; fi + RUN python3 -m venv ${ARROW_PYTHON_VENV} && \ . ${ARROW_PYTHON_VENV}/bin/activate && \ pip install -U pip setuptools wheel && \ diff --git a/ci/scripts/install_python.sh b/ci/scripts/install_python.sh index 25c0dc1c024f7..5d9f6e610a304 100755 --- a/ci/scripts/install_python.sh +++ b/ci/scripts/install_python.sh @@ -68,8 +68,32 @@ if [ $platform = "macOS" ]; then python="/Library/Frameworks/Python.framework/Versions/${version}/bin/python${version}" pip="${python} -m pip" + $python -m ensurepip + $pip install -U pip setuptools +elif [ $platform = "Linux" ] ; then + echo "Downloading Python installer..." + + if [ "$version" = "3.13" ]; + then + fname="Python-${full_version}rc1.tar.xz" + else + fname="Python-${full_version}.tar.xz" + fi + wget "https://www.python.org/ftp/python/${full_version}/${fname}" + + echo "Building and installing Python..." + tar -xf ${fname} + rm $fname + pushd Python-3.* + ./configure + make install + popd + python=/usr/local/bin/python3 + pip="${python} -m pip" + $python -m ensurepip $pip install -U pip setuptools else echo "Unsupported platform: $platform" + exit 1 fi diff --git a/docker-compose.yml b/docker-compose.yml index 9b0b6266f275a..c658a576cad57 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -985,14 +985,17 @@ services: # Parameters: # ARCH: amd64, arm64v8, ... # UBUNTU: 20.04, 22.04 - image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-python-3 + # PYTHON: 3.9, 3.10, ... + image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-python-${PYTHON} build: context: . dockerfile: ci/docker/linux-apt-python-3.dockerfile cache_from: - - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-python-3 + - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-python-${PYTHON} args: base: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-cpp + ubuntu: ${UBUNTU} + python: ${PYTHON} shm_size: *shm-size environment: <<: [*common, *ccache] @@ -1548,6 +1551,8 @@ services: tz: ${TZ} r_prune_deps: ${R_PRUNE_DEPS} r_duckdb_dev: ${R_DUCKDB_DEV:-} + ubuntu: ${UBUNTU} + python: ${PYTHON} shm_size: *shm-size environment: <<: [*common, *ccache, *sccache] From 04fba6b1c43480b2d8828928783617d80364177c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Mon, 9 Sep 2024 15:54:49 +0200 Subject: [PATCH 07/21] Add manual installation of Python for R Ubuntu 20.04 and update some numpy pandas versions --- ci/docker/linux-apt-python-3.dockerfile | 1 + dev/tasks/tasks.yml | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ci/docker/linux-apt-python-3.dockerfile b/ci/docker/linux-apt-python-3.dockerfile index 9130b5266633a..65fc78d796cee 100644 --- a/ci/docker/linux-apt-python-3.dockerfile +++ b/ci/docker/linux-apt-python-3.dockerfile @@ -27,6 +27,7 @@ ENV ARROW_PYTHON_VENV /arrow-dev ARG ubuntu ARG python="3.12" COPY ci/scripts/install_python.sh /arrow/ci/scripts/ +# Ubuntu 20.04 uses python 3.8 which is unsuported for pyarrow RUN if [ "${ubuntu}" = "20.04" ]; then \ quiet=$([ "${DEBUG}" = "yes" ] || echo "-qq") && \ apt update ${quiet} && \ diff --git a/dev/tasks/tasks.yml b/dev/tasks/tasks.yml index 785af490c84a4..574e94a151f78 100644 --- a/dev/tasks/tasks.yml +++ b/dev/tasks/tasks.yml @@ -1541,12 +1541,12 @@ tasks: ############################## Integration tests ############################ -{% for python_version, pandas_version, numpy_version, cache_leaf in [("3.9", "1.0", "1.19", True), +{% for python_version, pandas_version, numpy_version, cache_leaf in [("3.9", "1.5", "1.24", True), ("3.10", "latest", "latest", False), ("3.11", "latest", "1.26", False), ("3.11", "latest", "latest", False), ("3.11", "nightly", "nightly", False), - ("3.12", "upstream_devel", "nightly", False)] %} + ("3.11", "upstream_devel", "nightly", False)] %} test-conda-python-{{ python_version }}-pandas-{{ pandas_version }}-numpy-{{ numpy_version }}: ci: github template: docker-tests/github.linux.yml From 2c71ba3aafc7b05bdae97e05b6d1ff0b9857bb3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Mon, 9 Sep 2024 16:31:34 +0200 Subject: [PATCH 08/21] Add Ubuntu version and Python version to args for cuda in order to install newer Python on image --- docker-compose.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index c658a576cad57..8315fc2fd1951 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -917,15 +917,19 @@ services: # Parameters: # ARCH: amd64 # CUDA: - image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-cuda-${CUDA}-python-3 + # UBUNTU: 20.04, 22.04, ... + # PYTHON: 3.9, 3.10, 3.11, ... + image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-cuda-${CUDA}-python-${PYTHON} build: context: . dockerfile: ci/docker/linux-apt-python-3.dockerfile cache_from: - - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-cuda-${CUDA}-python-3 + - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-cuda-${CUDA}-python-${PYTHON} args: base: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-cuda-${CUDA}-cpp numba: ${NUMBA} + ubuntu: ${UBUNTU} + python: ${PYTHON} shm_size: *shm-size environment: <<: [*common, *ccache, *sccache] From 737929d3cc5813fea8cff262d87e63b00359d7ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Mon, 9 Sep 2024 16:45:28 +0200 Subject: [PATCH 09/21] Add ubuntu and python to ubuntu-python-sdist-test docker job in order to install newer python --- docker-compose.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 8315fc2fd1951..edbfcaac3ebfc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1072,14 +1072,17 @@ services: # ARCH: amd64, arm64v8, ... # PYARROW_VERSION: The test target pyarrow version such as "3.0.0" # UBUNTU: 20.04, 22.04 - image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-python-3 + # PYTHON: 3.9, 3.10, 3.11, ... + image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-python-${PYTHON} build: context: . dockerfile: ci/docker/linux-apt-python-3.dockerfile cache_from: - - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-python-3 + - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-python-${PYTHON} args: base: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-cpp + ubuntu: ${UBUNTU} + python: ${PYTHON} shm_size: *shm-size environment: <<: [*common, *ccache] From dc431cb977dd086eb040b2c8d7a35e4dd88e9a3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Tue, 10 Sep 2024 18:55:26 +0200 Subject: [PATCH 10/21] Try to use Ubuntu 22.04 --- ci/scripts/r_test.sh | 2 +- docker-compose.yml | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/ci/scripts/r_test.sh b/ci/scripts/r_test.sh index d5fd78914755e..13b103f972a80 100755 --- a/ci/scripts/r_test.sh +++ b/ci/scripts/r_test.sh @@ -102,7 +102,7 @@ SCRIPT="as_cran <- !identical(tolower(Sys.getenv('NOT_CRAN')), 'true') if (requireNamespace('reticulate', quietly = TRUE) && reticulate::py_module_available('pyarrow')) { message('Running flight demo server for tests.') pid_flight <- sys::exec_background( - 'python', + 'python3', c( '-c', paste0( diff --git a/docker-compose.yml b/docker-compose.yml index edbfcaac3ebfc..fb3c76080c235 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1558,8 +1558,6 @@ services: tz: ${TZ} r_prune_deps: ${R_PRUNE_DEPS} r_duckdb_dev: ${R_DUCKDB_DEV:-} - ubuntu: ${UBUNTU} - python: ${PYTHON} shm_size: *shm-size environment: <<: [*common, *ccache, *sccache] From 66341623a3c42382c10529db88a640fcbc97e406 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Mon, 16 Sep 2024 10:44:16 +0200 Subject: [PATCH 11/21] Change Python 3.x to pin 3.12 --- .github/workflows/go.yml | 4 ++-- .github/workflows/integration.yml | 2 +- .github/workflows/java.yml | 2 +- .github/workflows/java_jni.yml | 4 ++-- .github/workflows/js.yml | 2 +- .github/workflows/python.yml | 2 +- .github/workflows/r.yml | 4 ++-- .github/workflows/ruby.yml | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 7902fd6b22b7a..9eba4c86362e1 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -211,7 +211,7 @@ jobs: - name: Setup Python uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 with: - python-version: 3.x + python-version: 3.12 - name: Setup Archery run: pip install -e dev/archery[docker] - name: Execute Docker Build @@ -251,7 +251,7 @@ jobs: - name: Setup Python uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 with: - python-version: 3.x + python-version: 3.12 - name: Setup Archery run: pip install -e dev/archery[docker] - name: Execute Docker Build diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index f2f92bec914da..bffc1c597b4c9 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -93,7 +93,7 @@ jobs: - name: Setup Python uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 with: - python-version: 3.x + python-version: 3.12 - name: Setup Archery run: pip install -e dev/archery[docker] - name: Execute Docker Build diff --git a/.github/workflows/java.yml b/.github/workflows/java.yml index 880c11a2d09b6..ad39dbc7d01e6 100644 --- a/.github/workflows/java.yml +++ b/.github/workflows/java.yml @@ -80,7 +80,7 @@ jobs: - name: Setup Python uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 with: - python-version: 3.x + python-version: 3.12 - name: Setup Archery run: pip install -e dev/archery[docker] - name: Execute Docker Build diff --git a/.github/workflows/java_jni.yml b/.github/workflows/java_jni.yml index 12aaf63f369d7..56aa1d0992887 100644 --- a/.github/workflows/java_jni.yml +++ b/.github/workflows/java_jni.yml @@ -74,7 +74,7 @@ jobs: - name: Setup Python uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 with: - python-version: 3.x + python-version: 3.12 - name: Setup Archery run: pip install -e dev/archery[docker] - name: Execute Docker Build @@ -116,7 +116,7 @@ jobs: - name: Setup Python uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 with: - python-version: 3.x + python-version: 3.12 - name: Setup Archery run: pip install -e dev/archery[docker] - name: Execute Docker Build diff --git a/.github/workflows/js.yml b/.github/workflows/js.yml index 7790bf786f477..c7693c05133b0 100644 --- a/.github/workflows/js.yml +++ b/.github/workflows/js.yml @@ -58,7 +58,7 @@ jobs: - name: Setup Python uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 with: - python-version: 3.x + python-version: 3.12 - name: Setup Archery run: pip install -e dev/archery[docker] - name: Execute Docker Build diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 8e80706fa8cde..5e13c73f4f2b1 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -111,7 +111,7 @@ jobs: - name: Setup Python uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 with: - python-version: 3.x + python-version: 3.12 - name: Setup Archery run: pip install -e dev/archery[docker] - name: Execute Docker Build diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml index b67b54c2afa31..9abedcd767150 100644 --- a/.github/workflows/r.yml +++ b/.github/workflows/r.yml @@ -150,7 +150,7 @@ jobs: - name: Setup Python uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 with: - python-version: 3.x + python-version: 3.12 - name: Setup Archery run: pip install -e dev/archery[docker] - name: Execute Docker Build @@ -209,7 +209,7 @@ jobs: - name: Setup Python uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 with: - python-version: 3.x + python-version: 3.12 - name: Setup Archery run: pip install -e dev/archery[docker] - name: Execute Docker Build diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index f445be797461b..83a066dc27386 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -87,7 +87,7 @@ jobs: - name: Setup Python uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 with: - python-version: 3.x + python-version: 3.12 - name: Setup Archery run: pip install -e dev/archery[docker] - name: Execute Docker Build From c8a7e97e3eb886c7b5e11c19a86241fedfd4957c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Mon, 16 Sep 2024 10:46:21 +0200 Subject: [PATCH 12/21] Use pandas 1.1 and numpy 1.19 as the minimum versions --- .github/workflows/python.yml | 8 ++++---- dev/tasks/tasks.yml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 5e13c73f4f2b1..1b0ad7991b31d 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -73,13 +73,13 @@ jobs: image: conda-python title: AMD64 Conda Python 3.10 Without Pandas python: "3.10" - - name: conda-python-3.9-pandas-1.5 + - name: conda-python-3.9-pandas-1.1 cache: conda-python-3.9 image: conda-python-pandas - title: AMD64 Conda Python 3.9 Pandas 1.5 + title: AMD64 Conda Python 3.9 Pandas 1.1 python: 3.9 - pandas: "1.5" - numpy: 1.24 + pandas: "1.1" + numpy: 1.19 - name: conda-python-3.11-pandas-latest cache: conda-python-3.11 image: conda-python-pandas diff --git a/dev/tasks/tasks.yml b/dev/tasks/tasks.yml index 574e94a151f78..ca130a389a5b4 100644 --- a/dev/tasks/tasks.yml +++ b/dev/tasks/tasks.yml @@ -1541,7 +1541,7 @@ tasks: ############################## Integration tests ############################ -{% for python_version, pandas_version, numpy_version, cache_leaf in [("3.9", "1.5", "1.24", True), +{% for python_version, pandas_version, numpy_version, cache_leaf in [("3.9", "1.1", "1.19", True), ("3.10", "latest", "latest", False), ("3.11", "latest", "1.26", False), ("3.11", "latest", "latest", False), From 0bc40f36f05d3f32429a742985b7b7ef7cc19479 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Mon, 16 Sep 2024 10:53:03 +0200 Subject: [PATCH 13/21] Remove manual Python installation from Ubuntu 20.04 --- ci/docker/linux-apt-python-3.dockerfile | 14 -------------- ci/scripts/install_python.sh | 23 ----------------------- ci/scripts/r_test.sh | 2 +- docker-compose.yml | 24 +++++++++--------------- 4 files changed, 10 insertions(+), 53 deletions(-) diff --git a/ci/docker/linux-apt-python-3.dockerfile b/ci/docker/linux-apt-python-3.dockerfile index 65fc78d796cee..e215976d44850 100644 --- a/ci/docker/linux-apt-python-3.dockerfile +++ b/ci/docker/linux-apt-python-3.dockerfile @@ -24,20 +24,6 @@ COPY python/requirements-build.txt \ ENV ARROW_PYTHON_VENV /arrow-dev -ARG ubuntu -ARG python="3.12" -COPY ci/scripts/install_python.sh /arrow/ci/scripts/ -# Ubuntu 20.04 uses python 3.8 which is unsuported for pyarrow -RUN if [ "${ubuntu}" = "20.04" ]; then \ - quiet=$([ "${DEBUG}" = "yes" ] || echo "-qq") && \ - apt update ${quiet} && \ - apt install -y -V ${quiet} \ - xz-utils && \ - apt clean && \ - rm -rf /var/lib/apt/lists/* && \ - /arrow/ci/scripts/install_python.sh linux ${python} \ - ; fi - RUN python3 -m venv ${ARROW_PYTHON_VENV} && \ . ${ARROW_PYTHON_VENV}/bin/activate && \ pip install -U pip setuptools wheel && \ diff --git a/ci/scripts/install_python.sh b/ci/scripts/install_python.sh index 5d9f6e610a304..21d8a16e3c2b8 100755 --- a/ci/scripts/install_python.sh +++ b/ci/scripts/install_python.sh @@ -68,29 +68,6 @@ if [ $platform = "macOS" ]; then python="/Library/Frameworks/Python.framework/Versions/${version}/bin/python${version}" pip="${python} -m pip" - $python -m ensurepip - $pip install -U pip setuptools -elif [ $platform = "Linux" ] ; then - echo "Downloading Python installer..." - - if [ "$version" = "3.13" ]; - then - fname="Python-${full_version}rc1.tar.xz" - else - fname="Python-${full_version}.tar.xz" - fi - wget "https://www.python.org/ftp/python/${full_version}/${fname}" - - echo "Building and installing Python..." - tar -xf ${fname} - rm $fname - pushd Python-3.* - ./configure - make install - popd - python=/usr/local/bin/python3 - pip="${python} -m pip" - $python -m ensurepip $pip install -U pip setuptools else diff --git a/ci/scripts/r_test.sh b/ci/scripts/r_test.sh index 13b103f972a80..d5fd78914755e 100755 --- a/ci/scripts/r_test.sh +++ b/ci/scripts/r_test.sh @@ -102,7 +102,7 @@ SCRIPT="as_cran <- !identical(tolower(Sys.getenv('NOT_CRAN')), 'true') if (requireNamespace('reticulate', quietly = TRUE) && reticulate::py_module_available('pyarrow')) { message('Running flight demo server for tests.') pid_flight <- sys::exec_background( - 'python3', + 'python', c( '-c', paste0( diff --git a/docker-compose.yml b/docker-compose.yml index fb3c76080c235..97c9cd7c4a37f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -917,19 +917,17 @@ services: # Parameters: # ARCH: amd64 # CUDA: - # UBUNTU: 20.04, 22.04, ... + # UBUNTU: 22.04, 24.04 # PYTHON: 3.9, 3.10, 3.11, ... - image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-cuda-${CUDA}-python-${PYTHON} + image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-cuda-${CUDA}-python-3 build: context: . dockerfile: ci/docker/linux-apt-python-3.dockerfile cache_from: - - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-cuda-${CUDA}-python-${PYTHON} + - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-cuda-${CUDA}-python-3 args: base: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-cuda-${CUDA}-cpp numba: ${NUMBA} - ubuntu: ${UBUNTU} - python: ${PYTHON} shm_size: *shm-size environment: <<: [*common, *ccache, *sccache] @@ -988,18 +986,16 @@ services: # docker-compose run --rm ubuntu-python # Parameters: # ARCH: amd64, arm64v8, ... - # UBUNTU: 20.04, 22.04 + # UBUNTU: 22.04, 24.04 # PYTHON: 3.9, 3.10, ... - image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-python-${PYTHON} + image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-python-3 build: context: . dockerfile: ci/docker/linux-apt-python-3.dockerfile cache_from: - - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-python-${PYTHON} + - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-python-3 args: base: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-cpp - ubuntu: ${UBUNTU} - python: ${PYTHON} shm_size: *shm-size environment: <<: [*common, *ccache] @@ -1071,18 +1067,16 @@ services: # Parameters: # ARCH: amd64, arm64v8, ... # PYARROW_VERSION: The test target pyarrow version such as "3.0.0" - # UBUNTU: 20.04, 22.04 + # UBUNTU: 22.04, 24.04 # PYTHON: 3.9, 3.10, 3.11, ... - image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-python-${PYTHON} + image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-python-3 build: context: . dockerfile: ci/docker/linux-apt-python-3.dockerfile cache_from: - - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-python-${PYTHON} + - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-python-3 args: base: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-cpp - ubuntu: ${UBUNTU} - python: ${PYTHON} shm_size: *shm-size environment: <<: [*common, *ccache] From 66bd33eaeb4572faeee33ccb0acc0887247fa7ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Mon, 16 Sep 2024 10:56:15 +0200 Subject: [PATCH 14/21] Simplify unnecessary raise_signal util function --- python/pyarrow/tests/test_csv.py | 5 +---- python/pyarrow/tests/test_flight.py | 4 +--- python/pyarrow/tests/util.py | 4 ---- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/python/pyarrow/tests/test_csv.py b/python/pyarrow/tests/test_csv.py index dcf96f68c4da7..c45a590bf287c 100644 --- a/python/pyarrow/tests/test_csv.py +++ b/python/pyarrow/tests/test_csv.py @@ -1444,14 +1444,11 @@ def test_cancellation(self): if (threading.current_thread().ident != threading.main_thread().ident): pytest.skip("test only works from main Python thread") - # Skips test if not available - raise_signal = util.get_raise_signal() - signum = signal.SIGINT def signal_from_thread(): # Give our workload a chance to start up time.sleep(0.2) - raise_signal(signum) + signal.raise_signal(signal.SIGINT) # We start with a small CSV reading workload and increase its size # until it's large enough to get an interruption during it, even in diff --git a/python/pyarrow/tests/test_flight.py b/python/pyarrow/tests/test_flight.py index 029a2695b9fd8..f0ceba37d6933 100644 --- a/python/pyarrow/tests/test_flight.py +++ b/python/pyarrow/tests/test_flight.py @@ -2101,12 +2101,10 @@ def do_exchange(self, context, descriptor, reader, writer): def test_interrupt(): if threading.current_thread().ident != threading.main_thread().ident: pytest.skip("test only works from main Python thread") - # Skips test if not available - raise_signal = util.get_raise_signal() def signal_from_thread(): time.sleep(0.5) - raise_signal(signal.SIGINT) + signal.raise_signal(signal.SIGINT) exc_types = (KeyboardInterrupt, pa.ArrowCancelled) diff --git a/python/pyarrow/tests/util.py b/python/pyarrow/tests/util.py index 558d9a621c23e..acbb2a5c0de6f 100644 --- a/python/pyarrow/tests/util.py +++ b/python/pyarrow/tests/util.py @@ -309,10 +309,6 @@ def open_append_stream(self, path, metadata): return self._fs.open_append_stream(path, metadata=metadata) -def get_raise_signal(): - return signal.raise_signal - - @contextlib.contextmanager def signal_wakeup_fd(*, warn_on_full_buffer=False): # Use a socket pair, rather a self-pipe, so that select() can be used From eebfea45636941577575a2acc53a2a5825c99f7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Mon, 16 Sep 2024 11:04:58 +0200 Subject: [PATCH 15/21] Use signal.SIGINT --- python/pyarrow/tests/test_csv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/pyarrow/tests/test_csv.py b/python/pyarrow/tests/test_csv.py index c45a590bf287c..6a36b41daf302 100644 --- a/python/pyarrow/tests/test_csv.py +++ b/python/pyarrow/tests/test_csv.py @@ -1504,7 +1504,7 @@ def signal_from_thread(): assert last_duration <= 2.0 e = exc_info.__context__ assert isinstance(e, pa.ArrowCancelled) - assert e.signum == signum + assert e.signum == signal.SIGINT @pytest.mark.threading def test_cancellation_disabled(self): From deb83bff1d2340cb45771cfd24cf3b322ec78a62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Mon, 16 Sep 2024 11:44:33 +0200 Subject: [PATCH 16/21] Use exact numpy version as 1.19 does not have Python 3.9 support --- .github/workflows/python.yml | 2 +- dev/tasks/tasks.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 1b0ad7991b31d..0b87b2fbe9948 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -79,7 +79,7 @@ jobs: title: AMD64 Conda Python 3.9 Pandas 1.1 python: 3.9 pandas: "1.1" - numpy: 1.19 + numpy: 1.19.5 - name: conda-python-3.11-pandas-latest cache: conda-python-3.11 image: conda-python-pandas diff --git a/dev/tasks/tasks.yml b/dev/tasks/tasks.yml index ca130a389a5b4..66fda64c1bcf9 100644 --- a/dev/tasks/tasks.yml +++ b/dev/tasks/tasks.yml @@ -1541,7 +1541,7 @@ tasks: ############################## Integration tests ############################ -{% for python_version, pandas_version, numpy_version, cache_leaf in [("3.9", "1.1", "1.19", True), +{% for python_version, pandas_version, numpy_version, cache_leaf in [("3.9", "1.1", "1.19.5", True), ("3.10", "latest", "latest", False), ("3.11", "latest", "1.26", False), ("3.11", "latest", "latest", False), From a2390ce7f4350a750f40d617e11c30d18c916191 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Mon, 16 Sep 2024 11:54:25 +0200 Subject: [PATCH 17/21] Use pandas 1.1.3 in order to have python 3.9 wheels and not build from source --- .github/workflows/python.yml | 6 +++--- dev/tasks/tasks.yml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 0b87b2fbe9948..18f1eccf03a20 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -73,12 +73,12 @@ jobs: image: conda-python title: AMD64 Conda Python 3.10 Without Pandas python: "3.10" - - name: conda-python-3.9-pandas-1.1 + - name: conda-python-3.9-pandas-1.1.3 cache: conda-python-3.9 image: conda-python-pandas - title: AMD64 Conda Python 3.9 Pandas 1.1 + title: AMD64 Conda Python 3.9 Pandas 1.1.3 python: 3.9 - pandas: "1.1" + pandas: "1.1.3" numpy: 1.19.5 - name: conda-python-3.11-pandas-latest cache: conda-python-3.11 diff --git a/dev/tasks/tasks.yml b/dev/tasks/tasks.yml index 66fda64c1bcf9..e66871c5ac072 100644 --- a/dev/tasks/tasks.yml +++ b/dev/tasks/tasks.yml @@ -1541,7 +1541,7 @@ tasks: ############################## Integration tests ############################ -{% for python_version, pandas_version, numpy_version, cache_leaf in [("3.9", "1.1", "1.19.5", True), +{% for python_version, pandas_version, numpy_version, cache_leaf in [("3.9", "1.1.3", "1.19.5", True), ("3.10", "latest", "latest", False), ("3.11", "latest", "1.26", False), ("3.11", "latest", "latest", False), From 336b9bbc84eed7a04193561ae647ec6af26bc164 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Mon, 16 Sep 2024 12:27:23 +0200 Subject: [PATCH 18/21] Bump Python jobs fro Ubuntu 20.04 to Ubuntu 22.04 --- dev/tasks/tasks.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/dev/tasks/tasks.yml b/dev/tasks/tasks.yml index e66871c5ac072..f9d3ca123b4e6 100644 --- a/dev/tasks/tasks.yml +++ b/dev/tasks/tasks.yml @@ -1285,20 +1285,20 @@ tasks: flags: "-e ARROW_S3=OFF -e ARROW_GANDIVA=OFF" image: debian-python - test-ubuntu-20.04-python-3: + test-ubuntu-22.04-python-3: ci: github template: docker-tests/github.linux.yml params: env: - UBUNTU: 20.04 + UBUNTU: 22.04 image: ubuntu-python - test-ubuntu-22.04-python-3: + test-ubuntu-24.04-python-3: ci: github template: docker-tests/github.linux.yml params: env: - UBUNTU: 22.04 + UBUNTU: 24.04 image: ubuntu-python test-fedora-39-python-3: @@ -1518,12 +1518,16 @@ tasks: ci: github template: docker-tests/github.cuda.yml params: + env: + UBUNTU: 22.04 image: ubuntu-cuda-cpp test-cuda-python: ci: github template: docker-tests/github.cuda.yml params: + env: + UBUNTU: 22.04 image: ubuntu-cuda-python ############################## Fuzz tests ################################# From 4f1cd9c515108d94f052ada66dca3234f0e53c29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Mon, 16 Sep 2024 12:42:05 +0200 Subject: [PATCH 19/21] Update CUDA to minimum version present on image for Ubuntu 22.04 --- dev/tasks/python-sdist/github.yml | 3 ++- dev/tasks/tasks.yml | 12 ++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/dev/tasks/python-sdist/github.yml b/dev/tasks/python-sdist/github.yml index ef36e358aa926..8a141c4099cd6 100644 --- a/dev/tasks/python-sdist/github.yml +++ b/dev/tasks/python-sdist/github.yml @@ -22,7 +22,7 @@ jobs: build: name: "Build sdist" - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: {{ macros.github_checkout_arrow()|indent }} {{ macros.github_install_archery()|indent }} @@ -39,6 +39,7 @@ jobs: - name: Test sdist run: archery docker run ubuntu-python-sdist-test env: + UBUNTU: 22.04 PYARROW_VERSION: {{ arrow.no_rc_version }} {{ macros.github_upload_releases("arrow/python/dist/*.tar.gz")|indent }} diff --git a/dev/tasks/tasks.yml b/dev/tasks/tasks.yml index f9d3ca123b4e6..4dcafc73a25ad 100644 --- a/dev/tasks/tasks.yml +++ b/dev/tasks/tasks.yml @@ -1514,20 +1514,28 @@ tasks: ############################## CUDA tests ################################# - test-cuda-cpp: + test-cuda-cpp-ubuntu-20.04-cuda-11.2.2: + ci: github + template: docker-tests/github.cuda.yml + params: + image: ubuntu-cuda-cpp + + test-cuda-cpp-ubuntu-22.04-cuda-11.7.1: ci: github template: docker-tests/github.cuda.yml params: env: UBUNTU: 22.04 + CUDA: 11.7.1 image: ubuntu-cuda-cpp - test-cuda-python: + test-cuda-python-ubuntu-22.04-cuda-11.7.1: ci: github template: docker-tests/github.cuda.yml params: env: UBUNTU: 22.04 + CUDA: 11.7.1 image: ubuntu-cuda-python ############################## Fuzz tests ################################# From 03cb553abeef5113a28e2ad8cd1bfd0dfdcc0f21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Mon, 16 Sep 2024 13:28:09 +0200 Subject: [PATCH 20/21] Fix name on python.yml --- .github/workflows/python.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 18f1eccf03a20..f2d5e004465e5 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -59,7 +59,7 @@ jobs: name: - conda-python-docs - conda-python-3.10-nopandas - - conda-python-3.9-pandas-1.5 + - conda-python-3.9-pandas-1.1.3 - conda-python-3.11-pandas-latest - conda-python-3.11-no-numpy include: From e629ba749f9e3990e582ddef37fabce05e8f5cdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Mon, 16 Sep 2024 13:32:30 +0200 Subject: [PATCH 21/21] Remove unnecessary comment --- docker-compose.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 97c9cd7c4a37f..66607157318a2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -918,7 +918,6 @@ services: # ARCH: amd64 # CUDA: # UBUNTU: 22.04, 24.04 - # PYTHON: 3.9, 3.10, 3.11, ... image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-cuda-${CUDA}-python-3 build: context: . @@ -987,7 +986,6 @@ services: # Parameters: # ARCH: amd64, arm64v8, ... # UBUNTU: 22.04, 24.04 - # PYTHON: 3.9, 3.10, ... image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-python-3 build: context: . @@ -1068,7 +1066,6 @@ services: # ARCH: amd64, arm64v8, ... # PYARROW_VERSION: The test target pyarrow version such as "3.0.0" # UBUNTU: 22.04, 24.04 - # PYTHON: 3.9, 3.10, 3.11, ... image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-python-3 build: context: .