-
Notifications
You must be signed in to change notification settings - Fork 333
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
Numpy 2.0 #1025
Comments
Thanks for raising this issue. Unfortunately there is no release of numpy 2.0.0 yet to test it, as a test environment will catch a few issues. As a first measure, we could add As almost all changes are backward compatible, we can remove that requirement, once we are satisfied (and have tested with numpy 2). A quick check with |
I misread and thought that the first release candidates should be out already, but the first RC is planned for 1 February I think, so at that time we should be abble to get a better idea if there are things we should fix. (PS Open question: would it be a good idea to add, at that time, numpy < 3.0.0 to the requirements, and maybe something similar to other the other packages?) |
I did quickly check with the ruff |
Thanks for raising this! A numpy RC is imminent I think. (detailed upstream issue with some discussions of finer points: numpy/numpy#24300) |
From numpy/numpy#24300 (comment)
At this point I don't know (and don't have the time to ascertain) if we are impacted by this -- I'm guessing that if our test suite just passes with @CasperSchippers can you finish/merge #1026? |
I see that b1 has just been released. Will try to look at it further this week/weekend. Based on what I've seen so far, it should be quite doable to get this fixed before 2.0.0 is released. |
Now numpy 2.0.0b1 has been released, i've started check the compatibility and, obviously, ran immediattely into an issue doing so. At this point it is difficult to tell if there are any other issues. The ruff rule that I used before didn't find anything else, but we'll have to wait for pandas before we can know for sure. |
numpy 2.0.0rc1 is here now: numpy/numpy#24300 (comment) |
Indeed rc1 has been released, and now also pandas 2.2.2, which supports numpy 2 (at least the release candidate) so I could start checking the our compatibility. I only ran into a single issue: pint is not yet compatible with numpy2. However, there is a fix in the git repo (hgrecco/pint@f2e4081), but not yet a release that includes the fix. Manually installing it from GitHub does work fine for testing however. Apart from that (and what was fixed already in the PR) I did not yet find any incompatibilities in our code base (with a careful 🎉). All tests are running fine, the examples that I've tried so far are working fine; finally I did some manual checking and didn't find anything (though I intend to do some more). |
I checked again and, apart from the aforementioned remarks, I think the PR is finished. Just a few remarks/questions:
|
I'd leave it up to the user. This will resolve in the short term, I guess.
Maybe just for a single python version and OS version. That ensures tests, but does not add many test cases.
I'd leave it as is, as our codebase does not require a newer version. That shows that it is only the python version, which makes the requirements. |
I agree, 👍 to all of these |
Thanks, will do this. One note regarding the minimum version of other packages: it is difficult to verify what version is the minumum version, since we cannot check whether the old versions work; for example, I can imagine that the fairly old pandas or numpy versions that are mentioned in the setup.cfg file, are not actually supported by our codebase, but we have no reasonable way to check this, since it is not possible to install these versions with the newer python versions. |
You're probably right. Especially pandas has had its first major release in the meantime - we should probably put this to We could bump dependency minimum versions to the oldest version available for the oldest Python version we support to avoid this. Note: I miss Julia with this, it has this nice solution for exactly this problem: https://github.com/julia-actions/julia-downgrade-compat |
I agree, that we should keep it at the lowest version possible. We just don't check compatibility. |
Sounds reasonable, we can keep the lowest possible version (although we're technically not entirely sure what the real lower limits are). So, I was intrigued and went to try running the tests with the older packages; I did not completely succeed, but was supprised to see that the older numpy and pandas versions I managed to install (1.12 & 0.20, respectively) did not not seem to be the problem. Older versions I could not check, since python 3.6 is a relatively hard bottom limit, due to all the f-strings (if you discount changing a single instance of |
I'll keep this issue open, since we do need to update the numpy-2 test (requiremenst.yml) to the final versions once numpy==2.0.0 and pint>0.23 are released. |
Soon, Numpy will release a version 2.0 with some breaking changes with respect to version 1.x.
https://numpy.org/devdocs/release/2.0.0-notes.html
https://numpy.org/devdocs/numpy_2_0_migration_guide.html
We should check (and try to fix of course) if there are any incompatibilities for us.
The text was updated successfully, but these errors were encountered: