Skip to content

Commit

Permalink
apacheGH-43518: [Python][Packaging][CI] Drop Python 3.8 support
Browse files Browse the repository at this point in the history
  • Loading branch information
raulcd committed Sep 5, 2024
1 parent f545b90 commit 03fbc60
Show file tree
Hide file tree
Showing 38 changed files with 95 additions and 114 deletions.
4 changes: 2 additions & 2 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -249,7 +249,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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/java_jni.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,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
Expand Down Expand Up @@ -112,7 +112,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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,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
Expand Down
50 changes: 25 additions & 25 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,41 +56,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' }}
Expand All @@ -109,7 +109,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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/r.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,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
Expand Down Expand Up @@ -208,7 +208,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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,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
Expand Down
4 changes: 2 additions & 2 deletions ci/docker/conda-python-cpython-debug.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/conda-python-cython2.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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" && \
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/conda-python-dask.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/conda-python-hdfs.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/conda-python-jpype.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/conda-python-pandas.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/conda-python-spark.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/conda-python.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions ci/docker/python-wheel-manylinux.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
9 changes: 4 additions & 5 deletions ci/docker/python-wheel-windows-test-vs2019.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,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
Expand Down
9 changes: 4 additions & 5 deletions ci/docker/python-wheel-windows-vs2019.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions ci/scripts/install_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ci/scripts/r_install_system_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 3 additions & 7 deletions dev/archery/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -57,7 +53,7 @@
maintainer_email='[email protected]',
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,
Expand Down
9 changes: 6 additions & 3 deletions dev/release/verify-release-candidate-wheels.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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%

Expand Down
2 changes: 1 addition & 1 deletion dev/release/verify-release-candidate.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading

0 comments on commit 03fbc60

Please sign in to comment.