Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-43518: [Python][Packaging][CI] Drop Python 3.8 support #43970

Merged
merged 21 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
929d4e0
GH-43518: [Python][Packaging][CI] Drop Python 3.8 support
raulcd Sep 5, 2024
6f1231a
Update 3.9 from GH setup-python to 3.x as suggested
raulcd Sep 9, 2024
a00ae82
Use newer ubuntu to have Python > 3.8 for linting
raulcd Sep 9, 2024
bdb884c
Add quotes to 3.10 and bump pandas to 1.5
raulcd Sep 9, 2024
c4b860b
Bump Ubuntu on R job and bump numpy version
raulcd Sep 9, 2024
9f158b4
Try installing Python manually if Ubuntu is 20.04 to update version
raulcd Sep 9, 2024
04fba6b
Add manual installation of Python for R Ubuntu 20.04 and update some …
raulcd Sep 9, 2024
2c71ba3
Add Ubuntu version and Python version to args for cuda in order to in…
raulcd Sep 9, 2024
737929d
Add ubuntu and python to ubuntu-python-sdist-test docker job in order…
raulcd Sep 9, 2024
dc431cb
Try to use Ubuntu 22.04
raulcd Sep 10, 2024
6634162
Change Python 3.x to pin 3.12
raulcd Sep 16, 2024
c8a7e97
Use pandas 1.1 and numpy 1.19 as the minimum versions
raulcd Sep 16, 2024
0bc40f3
Remove manual Python installation from Ubuntu 20.04
raulcd Sep 16, 2024
66bd33e
Simplify unnecessary raise_signal util function
raulcd Sep 16, 2024
eebfea4
Use signal.SIGINT
raulcd Sep 16, 2024
deb83bf
Use exact numpy version as 1.19 does not have Python 3.9 support
raulcd Sep 16, 2024
a2390ce
Use pandas 1.1.3 in order to have python 3.9 wheels and not build fro…
raulcd Sep 16, 2024
336b9bb
Bump Python jobs fro Ubuntu 20.04 to Ubuntu 22.04
raulcd Sep 16, 2024
4f1cd9c
Update CUDA to minimum version present on image for Ubuntu 22.04
raulcd Sep 16, 2024
03cb553
Fix name on python.yml
raulcd Sep 16, 2024
e629ba7
Remove unnecessary comment
raulcd Sep 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
1 change: 1 addition & 0 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: 3.8
python-version: 3.12
- name: Setup Archery
run: pip install -e dev/archery[docker]
- name: Execute Docker Build
Expand Down Expand Up @@ -251,7 +251,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: 3.8
python-version: 3.12
- 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 @@ -93,7 +93,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: 3.8
python-version: 3.12
- 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 @@ -80,7 +80,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: 3.8
python-version: 3.12
- 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 @@ -74,7 +74,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: 3.8
python-version: 3.12
- name: Setup Archery
run: pip install -e dev/archery[docker]
- name: Execute Docker Build
Expand Down Expand Up @@ -116,7 +116,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: 3.8
python-version: 3.12
- 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 @@ -58,7 +58,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: 3.8
python-version: 3.12
- name: Setup Archery
run: pip install -e dev/archery[docker]
- name: Execute Docker Build
Expand Down
54 changes: 27 additions & 27 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.1.3
- 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.1.3
cache: conda-python-3.9
image: conda-python-pandas
title: AMD64 Conda Python 3.8 Pandas 1.0
python: 3.8
pandas: "1.0"
numpy: 1.16
- name: conda-python-3.10-pandas-latest
cache: conda-python-3.10
title: AMD64 Conda Python 3.9 Pandas 1.1.3
python: 3.9
pandas: "1.1.3"
numpy: 1.19.5
- 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 @@ -111,7 +111,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: 3.8
python-version: 3.12
- 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 @@ -150,7 +150,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: 3.8
python-version: 3.12
- name: Setup Archery
run: pip install -e dev/archery[docker]
- name: Execute Docker Build
Expand Down 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.12
- 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 @@ -87,7 +87,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: 3.8
python-version: 3.12
- 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
1 change: 1 addition & 0 deletions ci/docker/linux-apt-python-3.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ COPY python/requirements-build.txt \
/arrow/python/

ENV ARROW_PYTHON_VENV /arrow-dev

RUN python3 -m venv ${ARROW_PYTHON_VENV} && \
. ${ARROW_PYTHON_VENV}/bin/activate && \
pip install -U pip setuptools wheel && \
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 @@ -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
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
6 changes: 3 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 Expand Up @@ -73,4 +72,5 @@ if [ $platform = "macOS" ]; then
$pip install -U pip setuptools
else
echo "Unsupported platform: $platform"
exit 1
fi
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='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,
Expand Down
Loading
Loading