Skip to content

GH-47443: [Python][Packaging] Drop Python 3.9 support#47478

Merged
raulcd merged 12 commits intoapache:mainfrom
raulcd:GH-47443
Sep 9, 2025
Merged

GH-47443: [Python][Packaging] Drop Python 3.9 support#47478
raulcd merged 12 commits intoapache:mainfrom
raulcd:GH-47443

Conversation

@raulcd
Copy link
Copy Markdown
Member

@raulcd raulcd commented Sep 2, 2025

Rationale for this change

Python 3.9 is End of Support on 31st October 2025. We can drop support for pyarrow 22.0.0.
See: https://endoflife.date/python

What changes are included in this PR?

Remove support for 3.9. Update minimum required Python version and update some CI jobs to use the minimum Python supported version

Are these changes tested?

They will be tested via CI and Archery

Are there any user-facing changes?

Yes in terms of not supporting older versions of Python. This will be a breaking change for some users but not for the API itself

@github-actions
Copy link
Copy Markdown

github-actions bot commented Sep 2, 2025

⚠️ GitHub issue #47443 has been automatically assigned in GitHub to PR creator.

@raulcd
Copy link
Copy Markdown
Member Author

raulcd commented Sep 3, 2025

@github-actions crossbow submit -g python

@github-actions
Copy link
Copy Markdown

github-actions bot commented Sep 3, 2025

Revision: e6a2ef8

Submitted crossbow builds: ursacomputing/crossbow @ actions-f2bbc8c456

Task Status
example-python-minimal-build-fedora-conda GitHub Actions
example-python-minimal-build-ubuntu-venv GitHub Actions
test-conda-python-3.10 GitHub Actions
test-conda-python-3.10-hdfs-2.9.2 GitHub Actions
test-conda-python-3.10-hdfs-3.2.1 GitHub Actions
test-conda-python-3.10-pandas-1.3.4-numpy-1.21.2 GitHub Actions
test-conda-python-3.11 GitHub Actions
test-conda-python-3.11-dask-latest GitHub Actions
test-conda-python-3.11-dask-upstream_devel GitHub Actions
test-conda-python-3.11-hypothesis GitHub Actions
test-conda-python-3.11-pandas-latest-numpy-latest GitHub Actions
test-conda-python-3.11-spark-master GitHub Actions
test-conda-python-3.12 GitHub Actions
test-conda-python-3.12-cpython-debug GitHub Actions
test-conda-python-3.12-pandas-latest-numpy-1.26 GitHub Actions
test-conda-python-3.12-pandas-latest-numpy-latest GitHub Actions
test-conda-python-3.12-pandas-nightly-numpy-nightly GitHub Actions
test-conda-python-3.12-pandas-upstream_devel-numpy-nightly GitHub Actions
test-conda-python-3.13 GitHub Actions
test-conda-python-emscripten GitHub Actions
test-cuda-python-ubuntu-22.04-cuda-11.7.1 GitHub Actions
test-debian-12-python-3-amd64 GitHub Actions
test-debian-12-python-3-i386 GitHub Actions
test-fedora-42-python-3 GitHub Actions
test-ubuntu-22.04-python-3 GitHub Actions
test-ubuntu-22.04-python-313-freethreading GitHub Actions
test-ubuntu-24.04-python-3 GitHub Actions

@raulcd
Copy link
Copy Markdown
Member Author

raulcd commented Sep 3, 2025

@github-actions crossbow submit -g wheel

@github-actions
Copy link
Copy Markdown

github-actions bot commented Sep 3, 2025

Revision: e6a2ef8

Submitted crossbow builds: ursacomputing/crossbow @ actions-1fe0f5e10d

Task Status
python-sdist GitHub Actions
wheel-macos-monterey-cp310-cp310-amd64 GitHub Actions
wheel-macos-monterey-cp310-cp310-arm64 GitHub Actions
wheel-macos-monterey-cp311-cp311-amd64 GitHub Actions
wheel-macos-monterey-cp311-cp311-arm64 GitHub Actions
wheel-macos-monterey-cp312-cp312-amd64 GitHub Actions
wheel-macos-monterey-cp312-cp312-arm64 GitHub Actions
wheel-macos-monterey-cp313-cp313-amd64 GitHub Actions
wheel-macos-monterey-cp313-cp313-arm64 GitHub Actions
wheel-macos-monterey-cp313-cp313t-amd64 GitHub Actions
wheel-macos-monterey-cp313-cp313t-arm64 GitHub Actions
wheel-manylinux-2-28-cp310-cp310-amd64 GitHub Actions
wheel-manylinux-2-28-cp310-cp310-arm64 GitHub Actions
wheel-manylinux-2-28-cp311-cp311-amd64 GitHub Actions
wheel-manylinux-2-28-cp311-cp311-arm64 GitHub Actions
wheel-manylinux-2-28-cp312-cp312-amd64 GitHub Actions
wheel-manylinux-2-28-cp312-cp312-arm64 GitHub Actions
wheel-manylinux-2-28-cp313-cp313-amd64 GitHub Actions
wheel-manylinux-2-28-cp313-cp313-arm64 GitHub Actions
wheel-manylinux-2-28-cp313-cp313t-amd64 GitHub Actions
wheel-manylinux-2-28-cp313-cp313t-arm64 GitHub Actions
wheel-musllinux-1-2-cp310-cp310-amd64 GitHub Actions
wheel-musllinux-1-2-cp310-cp310-arm64 GitHub Actions
wheel-musllinux-1-2-cp311-cp311-amd64 GitHub Actions
wheel-musllinux-1-2-cp311-cp311-arm64 GitHub Actions
wheel-musllinux-1-2-cp312-cp312-amd64 GitHub Actions
wheel-musllinux-1-2-cp312-cp312-arm64 GitHub Actions
wheel-musllinux-1-2-cp313-cp313-amd64 GitHub Actions
wheel-musllinux-1-2-cp313-cp313-arm64 GitHub Actions
wheel-musllinux-1-2-cp313-cp313t-amd64 GitHub Actions
wheel-musllinux-1-2-cp313-cp313t-arm64 GitHub Actions
wheel-windows-cp310-cp310-amd64 GitHub Actions
wheel-windows-cp311-cp311-amd64 GitHub Actions
wheel-windows-cp312-cp312-amd64 GitHub Actions
wheel-windows-cp313-cp313-amd64 GitHub Actions
wheel-windows-cp313-cp313t-amd64 GitHub Actions

@raulcd
Copy link
Copy Markdown
Member Author

raulcd commented Sep 3, 2025

@github-actions crossbow submit python-sdist

@github-actions
Copy link
Copy Markdown

github-actions bot commented Sep 3, 2025

Revision: 1a93e2d

Submitted crossbow builds: ursacomputing/crossbow @ actions-d6131de9fb

Task Status
python-sdist GitHub Actions

@raulcd
Copy link
Copy Markdown
Member Author

raulcd commented Sep 3, 2025

@github-actions crossbow submit wheel-manylinux-cp312

@raulcd
Copy link
Copy Markdown
Member Author

raulcd commented Sep 3, 2025

@github-actions crossbow submit almalinux-8-*

@github-actions
Copy link
Copy Markdown

github-actions bot commented Sep 3, 2025

Revision: d3b86df

Submitted crossbow builds: ursacomputing/crossbow @ actions-57dbfc6a95

Task Status
wheel-manylinux-2-28-cp312-cp312-amd64 GitHub Actions
wheel-manylinux-2-28-cp312-cp312-arm64 GitHub Actions

@github-actions
Copy link
Copy Markdown

github-actions bot commented Sep 3, 2025

Revision: d3b86df

Submitted crossbow builds: ursacomputing/crossbow @ actions-8cec7add92

Task Status
almalinux-8-amd64 GitHub Actions
almalinux-8-arm64 GitHub Actions

@raulcd
Copy link
Copy Markdown
Member Author

raulcd commented Sep 3, 2025

@github-actions crossbow submit almalinux-8-*

@github-actions
Copy link
Copy Markdown

github-actions bot commented Sep 3, 2025

Revision: 59d506c

Submitted crossbow builds: ursacomputing/crossbow @ actions-85a6c18ceb

Task Status
almalinux-8-amd64 GitHub Actions
almalinux-8-arm64 GitHub Actions

@raulcd
Copy link
Copy Markdown
Member Author

raulcd commented Sep 3, 2025

@github-actions crossbow submit almalinux-8-*

@github-actions
Copy link
Copy Markdown

github-actions bot commented Sep 3, 2025

Revision: ea2eebb

Submitted crossbow builds: ursacomputing/crossbow @ actions-598c97696a

Task Status
almalinux-8-amd64 GitHub Actions
almalinux-8-arm64 GitHub Actions

@raulcd
Copy link
Copy Markdown
Member Author

raulcd commented Sep 3, 2025

@github-actions crossbow submit python-sdist

@raulcd
Copy link
Copy Markdown
Member Author

raulcd commented Sep 4, 2025

The Windows wheels failures are being tackled on a different PR where I am currently working on

Copy link
Copy Markdown
Member

@kou kou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@github-actions github-actions bot added awaiting merge Awaiting merge and removed awaiting changes Awaiting changes labels Sep 4, 2025
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting merge Awaiting merge labels Sep 4, 2025
@raulcd
Copy link
Copy Markdown
Member Author

raulcd commented Sep 8, 2025

@AlenkaF @rok @pitrou , I'll merge this tomorrow, are you ok with it?

@github-actions github-actions bot added awaiting merge Awaiting merge and removed awaiting changes Awaiting changes labels Sep 8, 2025
--------------------

PyArrow is currently compatible with Python 3.9, 3.10, 3.11, 3.12 and 3.13.
PyArrow is currently compatible with Python 3.10, 3.11, 3.12 and 3.13.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bit lower down in this file, there is a listing of the optional dependencies and the minimal versions we support. That could be updated?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although, for example for pandas, we strictly speaking still support pandas >= 1.0, even though we only test with pandas 1.3, since that is the version we check for in python/pyarrow/pandas-shim.pxi

I think that that could be bumped, but can also be for separate issue

Copy link
Copy Markdown
Member Author

@raulcd raulcd Sep 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll bump to:

* **NumPy 1.21.2** or higher.
* **pandas 1.3.4** or higher,

because we might be able to build with pandas 1.0 but there's no Python wheel for a supported Python version so I think it's still worth bumping the docs too, we can bump python/pyarrow/pandas-shim.pxi on a follow up PR.

@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting merge Awaiting merge labels Sep 8, 2025
@github-actions github-actions bot added awaiting change review Awaiting change review and removed awaiting changes Awaiting changes labels Sep 8, 2025
@raulcd raulcd merged commit aedb752 into apache:main Sep 9, 2025
35 checks passed
@raulcd raulcd removed the awaiting change review Awaiting change review label Sep 9, 2025
@conbench-apache-arrow
Copy link
Copy Markdown

After merging your PR, Conbench analyzed the 4 benchmarking runs that have been run so far on merge-commit aedb752.

There weren't enough matching historic benchmark results to make a call on whether there were regressions.

The full Conbench report has more details.

zanmato1984 pushed a commit to zanmato1984/arrow that referenced this pull request Oct 15, 2025
…7478)

### Rationale for this change

Python 3.9 is End of Support on 31st October 2025. We can drop support for pyarrow 22.0.0.
See: https://endoflife.date/python

### What changes are included in this PR?

Remove support for 3.9. Update minimum required Python version and update some CI jobs to use the minimum Python supported version

### Are these changes tested?

They will be tested via CI and Archery

### Are there any user-facing changes?

Yes in terms of not supporting older versions of Python. This will be a breaking change for some users but not for the API itself
* GitHub Issue: apache#47443

Lead-authored-by: Raúl Cumplido <raulcumplido@gmail.com>
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Signed-off-by: Raúl Cumplido <raulcumplido@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants