-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Backward compatibility and numpy 2.0 #12672
Comments
Our policy has always been to only support one version back and no father. There are probably other breakages with other packages in 1.2 for example and it'll increase maintenance burden (potentially a lot) with little gain for end users I think to continuously monitor and fix those. So I'd rather continue not to update anything father back than 1.7. |
Also I think that might be a misreading of SPEC0. I think it is meant to say that a MNE released today should work with latest NumPy back to the one from two years ago, not that MNE released version from two years ago should be continuously updated to work with NumPy from today. |
agree, and this is documented here: https://github.com/mne-tools/mne-python/blob/main/SECURITY.md (not super findable, but still)
agree. |
I completely agree with that, but from the point of view of a downstream package, it means that it should work with an MNE released today or 2 years ago. Yet an install of MNE from 2 years ago yields a broken install nowadays. What would be the fix for a downstream package then? (1) ignore the issue, it's up to the user to know that if he runs |
Agree as well, but |
ah OK, I see the dilemma now. If you want MNE-LSL to follow SPEC-0, then you either need to
I don't want to "open the floodgates" on keeping old MNE versions patched, but indeed it would have been better to have had upper (major-version) pins back then. So now the question is whether (1) or (2) is better/easier. I doubt MNE-LSL is the only downstream affected by this (just the only one telling us so far 😅), so I guess I'm +0.5 on actually backporting the pins. |
I think this is fine. If you really want to use an old version of any library you're going to face issues like this. I don't think major libraries are planning to retroactively pin -- looking at a pandas release 1.5.x series from ~22 months ago for example:
I also vaguely recall somewhere in the (long!) NumPy 2.0 discussions people mentioning how trying to retroactively pin like this ends up being not super helpful, because even you cut a Going forward we could consider a |
OK, that's convincing. +1 on |
OK! So NumPy pins go in the downstreams. By the way @larsoner should we add MNE to numpy/numpy#26191 (ecosystem compatibility tracker)? |
Sure -- I was going to say we need to look back to figure out the min version that's np2 compatible, but we could just say 1.7.0 since 1.6.x and older are unsupported anyway. |
MNE seems to support
numpy
2.0 as of version 1.6. Now, if we follow SPEC0, downstream packages should support their core dependencies (e.g. MNE) during 2 years. Yet, if you dopip install mne==1.4.2
, you end up with a broken installation because there is no upper pin on thenumpy
version.Should we add an upper version pin
<2
onnumpy
onmaint/1.2
,maint/1.3
,maint/1.4
,maint/1.5
, and cut a bugfix release on those MNE versions?I'm not sure if this is the best solution to ensure easy support for downstream packages, any other ideas?
For x-ref, CIs failing on
mne-lsl
: mne-tools/mne-lsl#289Might maybe also impact other packages in the ecosystem?
The text was updated successfully, but these errors were encountered: