API: Remove several niche objects for numpy 2.0 python API cleanup#24144
API: Remove several niche objects for numpy 2.0 python API cleanup#24144seberg merged 6 commits intonumpy:mainfrom
Conversation
|
I think |
|
There has been recent activity related to I'm ambivalent about the ultimate fate of |
|
OK, updated with |
There is a compelling reason, namely NumPy 2.0 which already requires new releases and wheel builds from every significant downstream package. I think this is the wrong PR to make this comment; this PR seems fine to me given |
|
I had a look at |
|
I would like to always think of the two things:
I will grant that |
|
@ev-br can you add brief release notes? Maybe with a sentence saying to replace EDIT: Forgot to metion, there is a python_removal category (iirc, there should be one fragment/file already) |
|
But, if anyone disagrees, I don't mind making it a deprecation, I just think the step adds little beyond allowing downstream to work without updates, and large chunks of downstream won't have that (and this won't be the reason why). |
Sure, done. |
|
Test failures are unfortunately real, there seem to be remains of these in the typing tests. |
|
CI is 🟢 |
|
Grrrrrrr, I did a github code search found a decent amount of I can follow up with that and finish that, though. |
If it's trivial to update, I think we should remove it. And otherwise we have to ensure it's not in the reference guide anymore - in this particular case that's already true though, so no extra work (but also an extra reason to remove, it was never even meant as public API). |
|
Ok, let's roll with it. I will note that if anyone complains about The replacement suggesting might not create a copy when there previously was, but I don't think that should be a problem, but rather an improvement in most cases. |
|
One note: removing Discovered because JAX's upstream nightly CI failed: jax-ml/jax#16864 Should there be some kind of deprecation cycle here? Left as is, the next numpy release will cause all existing scipy releases to error on import. |
|
scipy usage will get fixed later today, thanks for finding it! |
|
I am not worried about SciPy since it must adapt to 2.0 anyway as a C-API user. But it is a data-point towards it being used enough to go through a deprecation to help smooth transition for small less maintained Python libs that may also use it. |
|
scipy PR: scipy/scipy#18973 |
|
I will write up a short proposal here and send it to the mailing list. Basically everything we want to remove is used somewhere, and what I would like to avoid is that we avoid any pain in 2.0 and as a result make 2.2 the major breaking release. That'd be worse. There may be things that indeed do deserve only a deprecation and removal in 2.2 or even later, but we cannot do that for every niche API. EDIT: done in this message |
As discussed in #23999 (comment), specifically #23999 (comment), remove
np.infoAn alternative is of course to formally deprecate them first :-).