Skip to content

Bump minimum NumPy version to 1.20 #988

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

Merged
merged 7 commits into from
Jul 6, 2022

Conversation

madsbk
Copy link
Contributor

@madsbk madsbk commented Mar 17, 2022

To make use of NEP-35, features such as #934 need NumPy version 1.20.

TODO:

  • Add unit tests and/or doctests in docstrings
  • Add docstrings and API docs for any new/modified user-facing classes and functions
  • New/modified features documented in docs/tutorial.rst
  • Changes documented in docs/release.rst
  • GitHub Actions have all passed
  • Test coverage is 100% (Codecov passes)

@madsbk madsbk force-pushed the pin_numpy_v1_20_0 branch from 06b9892 to 1580dba Compare March 17, 2022 08:41
@madsbk madsbk marked this pull request as ready for review March 17, 2022 09:18
@jakirkham
Copy link
Member

jakirkham commented Mar 18, 2022

@rabernat would be good to get your thoughts on this 🙂 What NumPy version is Xarray using?

Also took a look at NEP 29 as another reference point. It appears they recommend moving to NumPy 1.20+ by June 21 (so in 3 months).

Edit: As another data point, conda-forge has a minimum of NumPy 1.19 currently.

@jhamman
Copy link
Member

jhamman commented Mar 24, 2022

@rabernat would be good to get your thoughts on this 🙂 What NumPy version is Xarray using?

Also took a look at NEP 29 as another reference point. It appears they recommend moving to NumPy 1.20+ by June 21 (so in 3 months).

I'm not @rabernat but can say that Xarray trys to follow NEP29 for its minimum Python and NumPy versions (https://xarray.pydata.org/en/v0.14.1/installing.html#minimum-dependency-versions). That currently puts us at:

  • python=3.8
  • numpy=1.18

@jakirkham
Copy link
Member

Would it be ok for Xarray if Zarr bumped its NumPy requirement? Or would that present issues?

Do we have a sense of how many users are on NumPy 1.18 or 1.19? Or NumPy 1.17 for that matter (Zarr's current minimum)?

@quasiben
Copy link

I think it's possible that work in #934 could be done for older versions of NumPy however, if NumPy 1.20 is going to be adopted in June I don't think there is much value for the effort in supporting older NumPy

@joshmoore
Copy link
Member

So it sounds like we need to get the order of a few things right:

  • Merging this PR
  • Releasing Zarr 2.12
  • June 21st

@jakirkham
Copy link
Member

jakirkham commented May 5, 2022

We put a quick poll on Twitter yesterday and shared that in a few places. To summarize we had 58 responses. The majority (60%) were using NumPy 1.20 or newer. NumPy 1.19 still had a fair number of users (22%). Versions prior had users, but less than 10% in each case.

While NumPy 1.20+ is used by a majority of users, it is not as large as one might like when making a decision around dropping versions. Setting a minimum of NumPy 1.19 is a bit more tenable in the near term given that covers more than 80% of users. It is also in line with the NEP and the current conda-forge minimum.

Would be curious to know how much it would help us to bump to NumPy 1.19 in the near term? Admittedly there may still be workarounds, but perhaps we could have fewer of them. It may also make it easier to bump to NumPy 1.20 in the future.

Also interested in hearing others thoughts on all of this 🙂

@jakirkham
Copy link
Member

@joshmoore @rabernat, thoughts on the comment above or this PR generally?

@joshmoore
Copy link
Member

Guess my biggest 2c is that the June date is quite close. I'd be happy though to commit to getting a minor version out with the older numpy and then drop in the next minor version so as to not prevent anyone from making use of 2.12.

@madsbk
Copy link
Contributor Author

madsbk commented Jun 20, 2022

Are we getting ready to require NumPy v1.20+ ?

@jakirkham
Copy link
Member

So June 21st has come and gone. Should we go ahead and merge?

@joshmoore
Copy link
Member

Just doing the numcodecs 0.10.0 release now. I'm inclined to get 2.12 out without this PR, and then start prepping a quick 2.13 with this PR as well as @d-v-b's Python 3.8+ typing usage. (Happy to be told I'm being overly cautious though)

@joshmoore joshmoore mentioned this pull request Jun 23, 2022
@jakirkham
Copy link
Member

Doing a release beforehand makes sense. Thanks for getting that started Josh 🙏

@madsbk
Copy link
Contributor Author

madsbk commented Jul 6, 2022

@joshmoore now that 2.12 is released, I think we should merge this. We don't necessarily have to do a new release, having it in main should be enough for me to continue my work on #934

@joshmoore
Copy link
Member

joshmoore commented Jul 6, 2022

Happy to get it into main (esp. with an eye to #1067) but we'll have to keep an eye out for an arising bugs that would require a 2.12.x. 👍

Edit: updating protected branches to get rid of the missing builds.

@joshmoore joshmoore merged commit e1b71a3 into zarr-developers:main Jul 6, 2022
@joshmoore joshmoore mentioned this pull request Jul 6, 2022
6 tasks
@jakirkham
Copy link
Member

Thanks all! 🙏

@madsbk madsbk deleted the pin_numpy_v1_20_0 branch August 2, 2022 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants