You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recommendation from NumPy developer to only drop 1.26 the earliest mid 2026: scientific-python/specs#386 (comment) (and as Arrow, we might even want to be a bit more conservative)
Recommendation from NumPy developer to only drop 1.26 the earliest mid 2026: scientific-python/specs#386 (comment) (and as Arrow, we might even want to be a bit more conservative)
I see. Well, it depends what the cost is for us of still supporting 1.26, I'd say.
Do you mean "cleaner" code-wise? i.e. that it is easier to use numpy 2.0 C API things when requiring numpy 2?
I looked at this today and it turns out it should be possible to get StringDType support working while still allowing NumPy 1.26 at runtime. The extra complexity is that to work with StringDType from C++, you'll need to use the NpyString C API, which is only available on NumPy 2.0 and newer.
If I have NumPy 1.26 installed and I try to import an extension that declares that it needs to use the NumPy 2.0 C API by setting NPY_TARGET_VERSION=NPY_2_0_API_VERSION, I'll see an ImportError at runtime inside of NumPy's C import_array() hook.
However, only one extension module needs to do this: all of PyArrow extension modules don't need to use the new NumPy C API version. Instead, you could put the things that need the NumPy 2.0 C API into their own extension module that needs NumPy 2.0 or newer at runtime. Then, you could only import that extension after doing the "regular" numpy import and checking NumPy's version to see if NumPy 2.0 is available at runtime.
So, not too bad, but definitely more complicated than #48473. I pinged the arrow-dev mailing list to see if anyone would be annoyed with dropping runtime support for older NumPy versions.
I double-checked and arrow's wheel builds already have a numpy>=2.0.0 bound in the requirements files and Arrow's CI already explicitly tests against NumPy 1.X at runtime to make sure NumPy's simultaneous backward and forward compatibility trick works in-practice.
I made the working PR with the old API a few months ago and there was some pushback that it's confusing, hard to read.
That can be revived if there is interest, but I believe the NumPy 2.0 should be a solid choice for Arrow 26.
The extension module trick is cool. Alternatively you can infer that python 3.13-3.14 is Numpy 2.0 for sure (and skip new numpy api support for python 3.10-3.12).
Activity
[-]Drop numpy 1.x support[/-][+]Require numpy 2.x and pandas 2.x[/+][-]Require numpy 2.x and pandas 2.x[/-][+][Python] Require numpy 2.x and pandas 2.x[/+]pitrou commentedon Dec 12, 2025
@jorisvandenbossche @rok @AlenkaF Does this sound reasonable?
rok commentedon Dec 12, 2025
Last 1.x was more than 24 months ago, so it sounds ok. I would appreciate @jorisvandenbossche 's opinion though.
jorisvandenbossche commentedon Dec 12, 2025
Yes, definitely, it is time to drop pandas 1.x support
For numpy 1.26 we might want wait a bit longer, although nowadays I think most projects have updated
jorisvandenbossche commentedon Dec 19, 2025
Recommendation from NumPy developer to only drop 1.26 the earliest mid 2026: scientific-python/specs#386 (comment) (and as Arrow, we might even want to be a bit more conservative)
pitrou commentedon Dec 19, 2025
I see. Well, it depends what the cost is for us of still supporting 1.26, I'd say.
[-][Python] Require numpy 2.x and pandas 2.x[/-][+][Python] Require numpy 2.x[/+]raulcd commentedon Apr 2, 2026
We should remove this fix from the musllinux wheels dockerfile when bumping numpy:
#49639
24 remaining items
ngoldbaum commentedon Aug 6, 2026
I looked at this today and it turns out it should be possible to get StringDType support working while still allowing NumPy 1.26 at runtime. The extra complexity is that to work with StringDType from C++, you'll need to use the NpyString C API, which is only available on NumPy 2.0 and newer.
If I have NumPy 1.26 installed and I try to import an extension that declares that it needs to use the NumPy 2.0 C API by setting
NPY_TARGET_VERSION=NPY_2_0_API_VERSION, I'll see an ImportError at runtime inside of NumPy's Cimport_array()hook.However, only one extension module needs to do this: all of PyArrow extension modules don't need to use the new NumPy C API version. Instead, you could put the things that need the NumPy 2.0 C API into their own extension module that needs NumPy 2.0 or newer at runtime. Then, you could only import that extension after doing the "regular" numpy import and checking NumPy's version to see if NumPy 2.0 is available at runtime.
So, not too bad, but definitely more complicated than #48473. I pinged the arrow-dev mailing list to see if anyone would be annoyed with dropping runtime support for older NumPy versions.
I double-checked and arrow's wheel builds already have a
numpy>=2.0.0bound in the requirements files and Arrow's CI already explicitly tests against NumPy 1.X at runtime to make sure NumPy's simultaneous backward and forward compatibility trick works in-practice.alippai commentedon Aug 7, 2026
I made the working PR with the old API a few months ago and there was some pushback that it's confusing, hard to read.
That can be revived if there is interest, but I believe the NumPy 2.0 should be a solid choice for Arrow 26.
The extension module trick is cool. Alternatively you can infer that python 3.13-3.14 is Numpy 2.0 for sure (and skip new numpy api support for python 3.10-3.12).
scientific-python/specs#386 (comment) here is a new update on the SPEC0 confirming the change.
While we officially don't follow SPEC0, they already dropped NumPy 2.0 and they are dropping NumPy 2.1 now.
apacheGH-48473: [CI][Python] Require numpy 2.0
apacheGH-48473: Update Pyodide to 0.27.1
apacheGH-48473: [Python] Preserve pandas 2.2 string dtype guard
apacheGH-48473: [Python] Pin legacy pandas test to nanoseconds
apacheGH-48473: [Python] Update pandas type map comment
apacheGH-48473: [CI][Python] Require numpy 2.0
apacheGH-48473: Update Pyodide to 0.27.1
apacheGH-48473: [Python] Preserve pandas 2.2 string dtype guard
apacheGH-48473: [Python] Pin legacy pandas test to nanoseconds
apacheGH-48473: [Python] Update pandas type map comment
GH-48473: [CI][Python] Require numpy 2.0 (#50769)
raulcd commentedon Aug 21, 2026
Issue resolved by pull request 50769
#50769