On Sun, Dec 14, 2025 at 2:00 PM Nathan via NumPy-Discussion <
[email protected]> wrote:

> Sebastian is talking about the temporary elision checks, which happen on
> Mac and Linux for sufficient large arrays by doing a somewhat cursed check
> involving stack unwinding to verify that numpy or Python created the array,
> and not a C extension.
>
> Python 3.14 changed the semantics for this, now it’s possible more often
> for an object to have a reference count of 1 but not actually be a
> temporary.
>
> See
> https://github.com/numpy/numpy/issues/28681
>  for the issue tracking the provlem and
> https://github.com/numpy/numpy/pull/29649 where I fixed this in NumPy 2.x.
>
> Also see
> https://github.com/python/cpython/issues/133140 for the CPython issue
> about this.
>
> Now, for what to do about this, I think maybe it is worth uploading a new
> 1.x release that errors out more usefully on 3.14. I’m not sure how painful
> that is and we also need to make sure we don’t accidentally break older
> Python versions.
>

It's painful and almost certainly not worth doing. We don't have
reproducible builds yet so don't even know exactly how the current 1.26.4
were built exactly, CI images have moved on so our wheel build machinery
would need significant work, etc. So it's too hard to do a new release
almost 2 years after the original release shipped. NumPy 1.26.4 doesn't
even support Python 3.13, and the chance of accidentally getting 1.26.4
with 3.14 is quite low. Whoever gets it now with 3.14 is just running into
a sharp edge of working directly from PyPI, such is life. And both the
churn and the risk of introducing a regression for actual valid usage of
1.26.x-using environments are more important than trying to isolate some
handfuls of users against broken code with 3.14.

Whether we should raise an ImportError or a clear build-time error in
maintenance branches for unsupported Python versions going forward is a
more relevant question I think.

Cheers,
Ralf
_______________________________________________
NumPy-Discussion mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/numpy-discussion.python.org
Member address: [email protected]

Reply via email to