GH-48473: [CI][Python] Require numpy 2.0 - #50769
Conversation
|
|
459c7f0 to
d0a51cc
Compare
|
@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. |
|
@github-actions crossbow submit -g python |
|
Revision: d0a51cc Submitted crossbow builds: ursacomputing/crossbow @ actions-764bbcb6f5 |
raulcd
left a comment
There was a problem hiding this comment.
Thanks @alippai for working on this. Changes LGTM in general, let me lauch extra CI and get the ok from @pitrou @jorisvandenbossche @AlenkaF
|
@github-actions crossbow submit wheel-cp313 |
|
Revision: d0a51cc Submitted crossbow builds: ursacomputing/crossbow @ actions-449ef0ee7b |
|
@github-actions crossbow submit wheel-cp311 |
|
Revision: d0a51cc Submitted crossbow builds: ursacomputing/crossbow @ actions-012e7c747c |
ngoldbaum
left a comment
There was a problem hiding this comment.
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.
cb5085f to
d0a51cc
Compare
|
@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. |
5c4831f to
dc6ef99
Compare
ngoldbaum
left a comment
There was a problem hiding this comment.
Just one last nit but this otherwise looks good to me!
dc6ef99 to
b2ceece
Compare
8ea5dc3 to
1a74543
Compare
Co-authored-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
|
@rok @raulcd @kou this is now ready again, two approvals added. pandas also requires numpy 2.0 in the upcoming pandas 3.1: pandas-dev/pandas#63403 (comment) |
|
I'll merge this in the next week if nobody objects it. |
|
@github-actions crossbow submit -g python -g wheel |
|
Revision: 55efae1 Submitted crossbow builds: ursacomputing/crossbow @ actions-1ef568d46d |
| @@ -430,16 +429,14 @@ def test_backwards_compatible_index_multi_level_some_named(datadir): | |||
|
|
|||
| @pytest.mark.pandas | |||
| def test_backwards_compatible_column_metadata_handling(datadir): | |||
There was a problem hiding this comment.
The failures seem related to the changes on test_backwards_compatible_column_metadata_handling. They didn't fail for the last nightly run:
https://github.com/ursacomputing/crossbow/actions/runs/31758047403/job/94638094168
Last nightly for test-conda-python-3.14-pandas-upstream_devel-numpy-nightly used: numpy 2.6.0.dev0+git20260812.d712d42 and pandas 3.1.0.dev0+1566.gf040cfd389
on this job: numpy 2.6.0.dev0+git20260812.d712d42 and pandas 3.1.0.dev0+1567.g7b0bc4da28
So there's a single pandas commit difference which seems unrelated:
pandas-dev/pandas@7b0bc4d
There was a problem hiding this comment.
I think this is happening because of pandas-dev/pandas#65194. This test is skipped on main so this is the first time it's been hit. One way to paper over this is to pass check_freq=False to assert_frame_equal below.
@jorisvandenbossche should this maybe have been a warning instead of an error on the Pandas side?
There was a problem hiding this comment.
For a normal (non-multi) index, pandas already raised before in assert_frame_equal (and so there the referenced PR is not changing anything), but for a MultiIndex I indeed see a change in behaviour, and ideally that should go through a deprecation warning as well.
But indeed, for here, passing check_freq=False should resolve it. Or alternatively add a ._with_freq(None) to the chain when creating the dates variable.
Rationale for this change
Require Numpy 2.0 to support newer features, allow newer numpy API/ABI
What changes are included in this PR?
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.