Skip to content
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

Bump minimum numpy version to 1.20 #6834

Merged
merged 28 commits into from
Oct 12, 2022
Merged

Bump minimum numpy version to 1.20 #6834

merged 28 commits into from
Oct 12, 2022

Conversation

headtr1ck
Copy link
Collaborator

@headtr1ck headtr1ck commented Jul 26, 2022

Alternative to #6821

@dcherian
Copy link
Contributor

Hmm... doesn't seem like we can do this yet:

Package           Required             Policy               Status
----------------- -------------------- -------------------- ------
python            3.8     (2019-10-14) 3.8     (2019-10-14) =
boto3             1.13    (2020-04-30) 1.18    (2021-07-15) <
bottleneck        1.3     (2019-11-13) 1.3     (2019-11-13) =
cartopy           0.19    (2021-04-23) 0.19    (2021-04-23) =
cdms2             3.1     (2018-11-02) 3.1     (2018-11-02) =
cfgrib            0.9     (2019-02-25) 0.9     (2019-02-25) =
cftime            1.4     (2021-02-01) 1.5     (2021-05-20) <
dask-core         2021.4  (2021-04-02) 2021.7  (2021-07-09) <
distributed       2021.4  (2021-04-02) 2021.7  (2021-07-10) <
flox              0.5     (2022-05-03) 0.5     (2022-05-03) =
h5netcdf          0.11    (2021-04-20) 0.11    (2021-04-20) =
h5py              3.1     (2020-11-07) 3.3     (2021-06-22) <
hdf5              1.10    (2017-09-18) 1.12    (2020-08-03) <
iris              2.4     (2020-02-21) 3.0     (2021-01-25) <
lxml              4.6     (2020-10-17) 4.6     (2020-10-17) =
matplotlib-base   3.4     (2021-03-31) 3.4     (2021-03-31) =
nc-time-axis      1.2     (2019-01-25) 1.3     (2021-06-11) <
netcdf4           1.5.3   (2019-03-24) 1.5     (2019-03-24) = (w)
numba             0.54    (2021-08-29) 0.53    (2021-03-12) > (!)
numpy             1.20    (2021-01-31) 1.19    (2020-07-16) > (!)
packaging         20.0    (2020-01-06) 21.0    (2021-07-03) <
pandas            1.2     (2020-12-26) 1.3     (2021-07-02) <
pint              0.17    (2021-03-22) 0.17    (2021-03-22) =
pseudonetcdf      3.1     (2019-10-18) 3.1     (2019-10-18) =
pydap             3.2     (2018-10-16) 3.2     (2018-10-16) =
rasterio          1.2     (2021-01-25) 1.2     (2021-01-25) =
scipy             1.6     (2020-12-31) 1.7     (2021-06-27) <
seaborn           0.11    (2020-09-08) 0.11    (2020-09-08) =
sparse            0.12    (2021-03-19) 0.12    (2021-03-19) =
toolz             0.11    (2020-09-24) 0.11    (2020-09-24) =
typing_extensions 3.7     (2019-02-25) 3.10    (2021-06-03) <
zarr              2.8     (2021-04-25) 2.8     (2021-04-25) =

@headtr1ck
Copy link
Collaborator Author

Ok seems @Illviljan and myself were a few month off xD #6821 (comment).

Nvmd then :)

@headtr1ck headtr1ck marked this pull request as draft July 26, 2022 22:37
@Illviljan
Copy link
Contributor

Oh no, I read the wrong table, sorry about that. :(

It's this table https://numpy.org/neps/nep-0029-deprecation_policy.html#drop-schedule :
On Jan 31, 2023 drop support for NumPy 1.20 (initially released on Jan 31, 2021)

@dcherian
Copy link
Contributor

Looks like we can bump a bunch of others if you're up for it :)

@headtr1ck
Copy link
Collaborator Author

It's this table https://numpy.org/neps/nep-0029-deprecation_policy.html#drop-schedule :
On Jan 31, 2023 drop support for NumPy 1.20 (initially released on Jan 31, 2021)

We are dropping 1.19 here, where this table says:
"On Jun 21, 2022 drop support for NumPy 1.19"
What is now correct?

@keewis
Copy link
Collaborator

keewis commented Jul 27, 2022

you can probably use the minimum version policy CI to check (we have a policy that slightly deviates from NEP29).

I think we can drop 1.18, but 1.19 should probably still be supported for a while longer.

@headtr1ck
Copy link
Collaborator Author

Ok I think I found my misunderstanding.

Instead of dropping versions older than 18 month we want the oldest supported version to be at least 18 month old.

@github-actions github-actions bot added CI Continuous Integration tools dependencies Pull requests that update a dependency file topic-arrays related to flexible array support topic-groupby topic-indexing topic-typing labels Oct 5, 2022
@headtr1ck headtr1ck marked this pull request as ready for review October 5, 2022 21:38
@headtr1ck
Copy link
Collaborator Author

Anyone know why min all deps fails?
As far as I can tell the only requirement of netCDF is python 3.8?

@headtr1ck
Copy link
Collaborator Author

I got rid of the complete npcompat module.
Not sure if you actually want to keep it around in case new incompatibilities arise?
But I guess we can always add it back.

@headtr1ck
Copy link
Collaborator Author

@dcherian I see that you were working on this the last time.
Do you have any idea why mamba fails to resolve the environment (for min-all-deps)?
With netcdf4=1.5.3 it fails for some python dependencies and with 1.5.4 it fails to find the correct cmds2?

We should really merge this, since all CI runs are currently broken due to new flox requiring numpy>=1.20

@tomvothecoder
Copy link
Contributor

tomvothecoder commented Oct 10, 2022

With netcdf4 1.5.4

Encountered problems while solving:
    - package cdms2-3.1.0-py27h6091dcd_0 requires python >=2.7,<2.8.0a0, but none of the providers can be installed

@tomvothecoder, I see you're committing to cdms. Is this something you've run in to?

since all CI runs are currently broken due to new flox requiring numpy>=1.20

sorry! trying to fix this in conda-forge/flox-feedstock#22

I haven't ran into this issue since I've only committed documentation and README updates for the repo.

@jasonb5 maintains the repo dependencies, so let's see if he can help. Jason, can you try taking a look at this issue? It looks like cdms2 is breaking the xarray builds.

As a side-note, cdms2 (and CDAT as a whole) is now in maintenance-only mode and support will cease around the end of CY 2023. Just an FYI to plan for possibly dropping cdms2 from xarray in the future. CDAT's successor is xCDAT (Xarray Climate Data Analysis Tools) .

doc/whats-new.rst Outdated Show resolved Hide resolved
xarray/core/npcompat.py Outdated Show resolved Hide resolved
@headtr1ck
Copy link
Collaborator Author

Is there a reason why the minimum versions are not in the additional requirements in setup.cfg?

@dcherian
Copy link
Contributor

Is there a reason why the minimum versions are not in the additional requirements in setup.cfg?

See #5578

@dcherian dcherian added the plan to merge Final call for comments label Oct 12, 2022
@jasonb5
Copy link

jasonb5 commented Oct 12, 2022

@dcherian @tomvothecoder cdms2-3.1.0 is old, the latest, final version is 3.1.5. Updating the version should probably resolve any dependency issues.

@headtr1ck
Copy link
Collaborator Author

We usually only fix the minor version, in this case cdms2=3.1. But it seems to work now...

LGTM!

@dcherian dcherian enabled auto-merge (squash) October 12, 2022 16:47
@dcherian dcherian merged commit 242d87d into pydata:main Oct 12, 2022
@headtr1ck headtr1ck deleted the bumpnumpy branch October 12, 2022 21:49
@Illviljan Illviljan mentioned this pull request Jan 24, 2023
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous Integration tools dependencies Pull requests that update a dependency file plan to merge Final call for comments topic-arrays related to flexible array support topic-groupby topic-indexing topic-typing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

xarray 2022.6.0 doesn't work well with numpy 1.20
6 participants