monocongo/climate_indices

Xarray 2023.1.0 dependency

Opened this issue · 5 comments

Good evening, I am using your fantastic library for a project but I need a recent version of xarray because of a bug that has been solved. I was wondering if you plan to move to a more recent version of xarray or include a less restrictive dependency.

Thanks for bringing this to my attention @matteodefelice

Yes, we can update the dependency to work around this bug. If you are comfortable doing so please update the pyproject.toml file accordingly and submit a PR. Otherwise please suggest a better version to use and I'll fix things myself. As long as the tests pass with a later version then we should be good to go.

Just done a PR, I hope that requiring xarray 2023.10.0 is not too strict, otherwise we can find something in between.

Seems like the PR will affect the ability to keep Python 3.8 support as that new version requires 3.9. What is the issue we're solving by using a more recent version of xarray? I'm happy to upgrade dependencies, but if we can do so without losing support for older Python versions that'll be preferable.

Unfortunately (or not), xarray dropped the support to Python 3.8 at the beginning of the year. The bug seems associated to pandas:
pydata/xarray#2385

However, in my case, if I install xarray-2023.10 it disappears, reappearing when I go back to 2023.1 (pandas stays unchanged).

I understand that you don't want drop Python 3.8, in that case I will try to find another version of xarray (or pandas) compatible with python 3.8 that doesn't trigger the error.

Thanks for sticking with it and looking for a 3.8-compatible solution. It looks like numpy dropped support for 3.8 this April so we're also facing that. Eventually, we'll fall in line.