Skip to content

Commit 466ce15

Browse files
zhengruifengksbeyer
authored andcommitted
[SPARK-52703][INFRA][PS] Upgrade minimum python version of pandas api to 3.10
### What changes were proposed in this pull request? Upgrade minimum python version of pandas api to 3.10 ### Why are the changes needed? python 3.9 is reaching the EOL, we should upgrade the minimum python version ### Does this PR introduce _any_ user-facing change? No, infra-only ### How was this patch tested? PR builder with env ``` default: '{"PYSPARK_IMAGE_TO_TEST": "python-ps-minimum", "PYTHON_TO_TEST": "python3.10"}' ``` https://github.com/zhengruifeng/spark/actions/runs/16133332146/job/45534172036 ### Was this patch authored or co-authored using generative AI tooling? no Closes apache#51397 from zhengruifeng/ps_py_310. Authored-by: Ruifeng Zheng <ruifengz@apache.org> Signed-off-by: Ruifeng Zheng <ruifengz@apache.org>
1 parent 5e9cfef commit 466ce15

File tree

2 files changed

+9
-18
lines changed

2 files changed

+9
-18
lines changed

.github/workflows/build_python_ps_minimum.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
envs: >-
3939
{
4040
"PYSPARK_IMAGE_TO_TEST": "python-ps-minimum",
41-
"PYTHON_TO_TEST": "python3.9"
41+
"PYTHON_TO_TEST": "python3.10"
4242
}
4343
jobs: >-
4444
{

dev/spark-test-image/python-ps-minimum/Dockerfile

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,12 @@ LABEL org.opencontainers.image.ref.name="Apache Spark Infra Image For Pandas API
2424
# Overwrite this label to avoid exposing the underlying Ubuntu OS version label
2525
LABEL org.opencontainers.image.version=""
2626

27-
ENV FULL_REFRESH_DATE=20250327
27+
ENV FULL_REFRESH_DATE=20250708
2828

2929
ENV DEBIAN_FRONTEND=noninteractive
3030
ENV DEBCONF_NONINTERACTIVE_SEEN=true
3131

32+
# Should keep the installation consistent with https://apache.github.io/spark/api/python/getting_started/install.html
3233
RUN apt-get update && apt-get install -y \
3334
build-essential \
3435
ca-certificates \
@@ -52,30 +53,20 @@ RUN apt-get update && apt-get install -y \
5253
libxml2-dev \
5354
openjdk-17-jdk-headless \
5455
pkg-config \
56+
python3.10 \
57+
python3-psutil \
5558
qpdf \
5659
tzdata \
5760
software-properties-common \
5861
wget \
5962
zlib1g-dev
6063

6164

62-
# Should keep the installation consistent with https://apache.github.io/spark/api/python/getting_started/install.html
63-
64-
# Install Python 3.9
65-
RUN add-apt-repository ppa:deadsnakes/ppa
66-
RUN apt-get update && apt-get install -y \
67-
python3.9 \
68-
python3.9-distutils \
69-
&& apt-get autoremove --purge -y \
70-
&& apt-get clean \
71-
&& rm -rf /var/lib/apt/lists/*
72-
73-
7465
ARG BASIC_PIP_PKGS="pyarrow==11.0.0 pandas==2.2.0 six==1.16.0 numpy scipy coverage unittest-xml-reporting"
7566
# Python deps for Spark Connect
7667
ARG CONNECT_PIP_PKGS="grpcio==1.67.0 grpcio-status==1.67.0 googleapis-common-protos==1.65.0 graphviz==0.20 protobuf"
7768

78-
# Install Python 3.9 packages
79-
RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3.9
80-
RUN python3.9 -m pip install --force $BASIC_PIP_PKGS $CONNECT_PIP_PKGS && \
81-
python3.9 -m pip cache purge
69+
# Install Python 3.10 packages
70+
RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10
71+
RUN python3.10 -m pip install --force $BASIC_PIP_PKGS $CONNECT_PIP_PKGS && \
72+
python3.10 -m pip cache purge

0 commit comments

Comments
 (0)