xarray icon indicating copy to clipboard operation
xarray copied to clipboard

drop support for `python=3.9`

Open keewis opened this issue 10 months ago • 6 comments

According to our policy (and NEP-29) we can drop support for python=3.9 since about a week ago. Interestingly, SPEC0 says we could have started doing this about half a year ago (Q4 2023).

We could delay this until we have a release that is compatible with numpy>=2.0, though (numpy>=2.1 will drop support for python=3.9).

  • [ ] User visible changes (including notable bug fixes) are documented in whats-new.rst

keewis avatar Apr 13 '24 10:04 keewis

This means we could replace Union[] with | everywhere in the type hints right?

TomNicholas avatar Apr 15 '24 14:04 TomNicholas

This means we could replace Union[] with | everywhere in the type hints right?

Shouldn't pyupgrade / ruff do that for us?

headtr1ck avatar Apr 15 '24 14:04 headtr1ck

it does, but only parts of it (other fixes it deems unsafe so they require manual intervention). I don't have time to go through each of them this week, but feel to push any of these directly to this PR.

keewis avatar Apr 15 '24 15:04 keewis

I think delaying this until we have at least one release that is fully compatible with numpy2 and Python 3.9 is a good idea.

Do we have an estimate on how much this would delay this merge?

headtr1ck avatar Jun 18 '24 06:06 headtr1ck

we have a numpy 2 + python 3.9 compatible release now, so once the merge conflicts are fixed this should be good to go

keewis avatar Jun 18 '24 07:06 keewis

we have a numpy 2 + python 3.9 compatible release now, so once the merge conflicts are fixed this should be good to go

It seems that there are still a few PRs open with fixes for numpy 2 and maybe we should wait a month or two to see if we get any bug reports related to that?

I know that we are all eager to have more nice python things :)

headtr1ck avatar Jun 19 '24 20:06 headtr1ck

I think we should move forward here

dcherian avatar Aug 06 '24 23:08 dcherian

it looks like UP007 will have to be converted manually

keewis avatar Aug 07 '24 17:08 keewis

The tests failures are present on main too.

dcherian avatar Aug 07 '24 18:08 dcherian

thanks for finishing this, @dcherian. Let's merge this now, and I'll update the list of required checks after that.

keewis avatar Aug 14 '24 10:08 keewis