Skip to content

GH-48473: [CI][Python] Require numpy 2.0 - #50769

Open
alippai wants to merge 7 commits into
apache:mainfrom
alippai:alippai-numpy-20
Open

GH-48473: [CI][Python] Require numpy 2.0#50769
alippai wants to merge 7 commits into
apache:mainfrom
alippai:alippai-numpy-20

Conversation

@alippai

@alippai alippai commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Rationale for this change

Require Numpy 2.0 to support newer features, allow newer numpy API/ABI

What changes are included in this PR?

  • Numpy 2.0+ requirement
  • Pandas 2.2.2+ requirement (first wheel compatible with numpy 2.0)
  • Pyodide 0.27.1 usage (numpy 2.0 api)

Are there any user-facing changes?

Yes, in contrast to pyarrow 25, after merging this PR pyarrow 26 can't be used with Numpy 1.x or pandas 2.0-2.2.1

This PR includes breaking changes to public APIs.

This PR was created using GPT-5.6-Sol-xhigh, every line read & reviewed by me.

@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown

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

@alippai

alippai commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

@tadeja @rok @raulcd @jorisvandenbossche this is ready for review. The failure seems to be an unrelated arrow flight timeout. Once this is on master, I'll file a new StringDType from/to conversion PR.

@kou

kou commented Aug 3, 2026

Copy link
Copy Markdown
Member

@github-actions crossbow submit -g python

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

Revision: d0a51cc

Submitted crossbow builds: ursacomputing/crossbow @ actions-764bbcb6f5

Task Status
example-python-minimal-build-fedora-conda GitHub Actions
example-python-minimal-build-ubuntu-venv 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-hdfs-2.9.2 GitHub Actions
test-conda-python-3.11-hdfs-3.2.1 GitHub Actions
test-conda-python-3.11-hypothesis GitHub Actions
test-conda-python-3.11-pandas-2.2.2-numpy-2.0.2 GitHub Actions
test-conda-python-3.11-spark-master GitHub Actions
test-conda-python-3.12 GitHub Actions
test-conda-python-3.12-pandas-latest-numpy-latest GitHub Actions
test-conda-python-3.13 GitHub Actions
test-conda-python-3.13-pandas-latest-numpy-2.1.0 GitHub Actions
test-conda-python-3.13-pandas-latest-numpy-latest GitHub Actions
test-conda-python-3.14 GitHub Actions
test-conda-python-3.14-cpython-debug GitHub Actions
test-conda-python-3.14-pandas-nightly-numpy-nightly GitHub Actions
test-conda-python-3.14-pandas-upstream_devel-numpy-nightly GitHub Actions
test-conda-python-emscripten GitHub Actions
test-debian-13-python-3-amd64 GitHub Actions
test-debian-13-python-3-i386 GitHub Actions
test-fedora-42-python-3 GitHub Actions
test-ubuntu-24.04-python-3 GitHub Actions

@raulcd raulcd left a comment

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.

Thanks @alippai for working on this. Changes LGTM in general, let me lauch extra CI and get the ok from @pitrou @jorisvandenbossche @AlenkaF

python: "3.11"
pandas: "2.0.3"
numpy: "1.23.2"
pandas: "2.2.2"

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.

@jorisvandenbossche is the bump to pandas 2.2.2 ok from your perspective in order to support numpy > 2?

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.

That should be fine I think (well, it is also unavoidable if we want to only support numpy >= 2)

@raulcd

raulcd commented Aug 3, 2026

Copy link
Copy Markdown
Member

@github-actions crossbow submit wheel-cp313

@github-actions github-actions Bot added awaiting changes Awaiting changes and removed awaiting review Awaiting review labels Aug 3, 2026
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

Revision: d0a51cc

Submitted crossbow builds: ursacomputing/crossbow @ actions-449ef0ee7b

Task Status
wheel-macos-monterey-cp313-cp313-amd64 GitHub Actions
wheel-macos-monterey-cp313-cp313-arm64 GitHub Actions
wheel-manylinux-2-28-cp313-cp313-amd64 GitHub Actions
wheel-manylinux-2-28-cp313-cp313-arm64 GitHub Actions
wheel-musllinux-1-2-cp313-cp313-amd64 GitHub Actions
wheel-musllinux-1-2-cp313-cp313-arm64 GitHub Actions
wheel-windows-cp313-cp313-amd64 GitHub Actions

@raulcd

raulcd commented Aug 3, 2026

Copy link
Copy Markdown
Member

@github-actions crossbow submit wheel-cp311

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

Revision: d0a51cc

Submitted crossbow builds: ursacomputing/crossbow @ actions-012e7c747c

Task Status
wheel-macos-monterey-cp311-cp311-amd64 GitHub Actions
wheel-macos-monterey-cp311-cp311-arm64 GitHub Actions
wheel-manylinux-2-28-cp311-cp311-amd64 GitHub Actions
wheel-manylinux-2-28-cp311-cp311-arm64 GitHub Actions
wheel-musllinux-1-2-cp311-cp311-amd64 GitHub Actions
wheel-musllinux-1-2-cp311-cp311-arm64 GitHub Actions
wheel-windows-cp311-cp311-amd64 GitHub Actions

@rok rok left a comment

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.

Thanks for working on this @alippai !

I found some other places where version checks occur 1, 2, 3, 4, 5. Could you take a look and see if we can simplify/remove those?

Comment thread python/pyarrow/tests/test_extension_type.py Outdated

@ngoldbaum ngoldbaum left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I asked an AI model to review this with an eye toward code that can be deleted to simplify interfacing with Pandas and it found several more places where you can delete or simplify code. I'm happy to take on these cleanups in a followup if you think my suggestions are scope creep.

Comment thread python/pyarrow/tests/test_extension_type.py Outdated
Comment thread python/pyarrow/pandas-shim.pxi Outdated
Comment thread python/CMakeLists.txt
Comment thread python/pyarrow/pandas-shim.pxi Outdated
Comment thread python/pyarrow/pandas-shim.pxi Outdated
Comment thread python/pyarrow/pandas-shim.pxi Outdated
Comment thread python/pyarrow/pandas-shim.pxi Outdated
Comment thread python/pyarrow/pandas_compat.py Outdated
Comment thread python/pyarrow/pandas_compat.py
Comment thread python/pyarrow/pandas_compat.py Outdated
@github-actions github-actions Bot added awaiting change review Awaiting change review and removed awaiting changes Awaiting changes labels Aug 3, 2026
@alippai

alippai commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

@ngoldbaum @rok thanks, I’ll address the pandas upgrade too. It was addressing the numpy upgrade only. I believe pandas improvements are in scope for this MR. Addressing upstream fixes and even onboarding the optimal/newer APIs allowed by the new version should land together.

@alippai
alippai requested review from ngoldbaum and rok August 3, 2026 23:54

@ngoldbaum ngoldbaum left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Just one last nit but this otherwise looks good to me!

Comment thread python/pyarrow/types.pxi Outdated
@alippai
alippai requested a review from raulcd August 4, 2026 23:44

@jorisvandenbossche jorisvandenbossche left a comment

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.

Looks good to me!

python: "3.11"
pandas: "2.0.3"
numpy: "1.23.2"
pandas: "2.2.2"

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.

That should be fine I think (well, it is also unavoidable if we want to only support numpy >= 2)

Comment thread dev/tasks/tasks.yml
{% for python_version, pandas_version, numpy_version, cache_leaf in [("3.11", "2.2.2", "2.0.2", True),
("3.12", "latest", "latest", False),
("3.13", "latest", "1.26.2", False),
("3.13", "latest", "2.1.0", False),

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.

Suggested change
("3.13", "latest", "2.1.0", False),
("3.13", "latest", "2.1.3", False),

(seems more logical to test with the latest bug-fix release from a certain series?)

@github-actions github-actions Bot added awaiting merge Awaiting merge and removed awaiting change review Awaiting change review labels Aug 6, 2026
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