-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
MAINT: update supported versions of Python and NumPy to follow NEP29 #17959
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
Conversation
f3e3c62
to
b9e7b1f
Compare
I'd probably want to merge this after #17950. Oh, and don't you mean drop 3.8, not 3.9? |
Correct! What is the link with your PR? |
#17950 . There's a lot of overlap with the ci configs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @tupui. A few initial comments.
The bump in NumPy versions from 1.19.5 to 1.22.4 (which is less than 9 months old) is quite aggressive. Unless there's a good reason for that, we should be more conservative and do a regular bump to 1.20.3 I'd say.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @rgommers
The bump in NumPy versions from 1.19.5 to 1.22.4 (which is less than 9 months old) is quite aggressive. Unless there's a good reason for that, we should be more conservative and do a regular bump to 1.20.3 I'd say.
I just think we should follow the NEP. 1.21 is supposed to be dropped around our release time in June.
On Apr 14, 2023 drop support for Python 3.8 (initially released on Oct 14, 2019)
On Jun 23, 2023 drop support for NumPy 1.21 (initially released on Jun 22, 2021)
Also, from what I have seen, our deps tend to update NumPy way faster than SciPy. By the time they update to 1.11, I don't think it would be an issue to require NumPy 1.21.
Not sure how to fix some of the failures otherwise (the linter could be ignored since it's only complaining about the |
azure-pipelines.yml
Outdated
@@ -177,29 +177,30 @@ stages: | |||
set -euo pipefail | |||
docker pull i386/ubuntu:bionic | |||
docker run -v $(pwd):/scipy i386/ubuntu:bionic /usr/bin/linux32 /bin/bash -c "cd scipy && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could use this instead? https://hub.docker.com/r/i386/python
Would mean going from an Ubuntu to a Debian. Which might be a good idea to test.
i386/python:3.9-bullseye
for instance
Also Python3.9 is available on Bullseye as opposed to later Ubuntu.
The Mypy error is a known bug and we would need to update mypy to work on Python 3.10. At least 0.981. python/mypy#13627 Not sure why we are pinning to 0.931. Also mypy 1.0 is out with great speed bump. |
Locally I could bump mypy, there was just a very minor things to adjust. We could remove the mypy requirements file too. Not done yet in case we want to keep it for some reason. |
@rgommers CI is mostly happy now, only 3 things remain.
Not sure, some suggest to update Cython? Might be due to these lines
I don't know. @andyfaff I guess your PR could fix this as you also update the Python version. Any help appreciated 🙇 Feel free to push on the branch directly. |
Perhaps we can compromise. To get back on track with NEP 29 without a huge jump in one release:
This would be consistent with the support table, and it wouldn't require a jump of more than two minor NumPy versions per SciPy release. |
The exact version doesn't matter, a bump is usually fine. We do need to pin to an exact version because new Mypy versions very often have both regressions and changes in behavior. And even plain improvements result in errors, because |
I suggest separating the problems here a bit. Just do not bump the version from 3.10 to 3.11 and open an issue for this one to fix in a separate PR. |
There's two things here to keep in mind:
For (1), we should be careful not to pick very recent bug-fix releases. NEP 29 aims for NumPy versions up to 24 months old; picking a version that's only 9 months old is going to result in problems for users too often. For (2), we should aim slightly on the conservative side here, rather than effectively making our support window 18 instead of 24 months. Now for the actual versions: we're aiming to release SciPy 1.11.0 around the middle of the year. NumPy 1.21.0 was released on June 22, 2021. So that's roughly 24 months. So I'd say that should be included, and 1.22.x is definitely too aggressive. The latest 1.21.x release is 1.21.6, released on April 12, 2022. So that will be 14 months old at that point. That's probably okay. So let's go with that, and we're adhering to NEP 29 as is. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two more comments on the pyproject.toml
changes.
1a0f029
to
b572734
Compare
It looks like the test needs tweak. The So how about skipping (not xfailing) the test here, and then opening a follow-up PR changing to |
@rgommers CI is green. |
… add Python 3.12-dev
Mistake rebased push the wrong thing, hopefully I did not break anything 😒 |
Azure itself did not like the rebase, but seems all good otherwise. EDIT: looks all good now. |
Anything else to do here? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks all 😃 |
This is a follow-up to scipygh-17959, which bumped numpy from 1.19.5 to 1.21.6, which is wrong because that version was built with vc142 (see comment above the line added in this PR). [wheel build] [skip circle] [skip cirrus] [skip azp]
This is a follow-up to scipygh-17959, which bumped numpy from 1.19.5 to 1.21.6, which is wrong because that version was built with vc142 (see comment above the line added in this PR). [wheel build] [skip circle] [skip cirrus] [skip azp]
This PR does the work to follow NEP29 for the next release (1.11) which probably is going to be scheduled around June.
Not sure about a few things and could have forgot to update some lines, please check carefully.
Closes #17959