flopy icon indicating copy to clipboard operation
flopy copied to clipboard

Python version support

Open wpbonelli opened this issue 9 months ago • 4 comments

~~Currently flopy aims to support all actively supported python versions.~~ The scientific python ecosystem has a narrower support window. Should flopy adopt it? Besides a lower maintenance burden it would allow using newer language features earlier with fewer version traps.

Suggested by @deltamarnix

wpbonelli avatar Mar 06 '25 01:03 wpbonelli

Note that DEVELOPER.md mentions NEP 29 (via #1662), which has largely been superseded by SPEC 0. Also, NumPy doesn't strictly follow SPEC 0 (e.g. numpy-2.2.3 supports 4 versions of Python, between 3.10 to 3.13 while SPEC 0 suggests Python>=3.11).

My suggestion is that this project loosely follows SPEC 0, with possibly more flexibility on the minimum supported version (e.g. following NumPy's version support). The primary rationale for this is to reduce the maintenance burden, e.g. running fewer CI combinations of Python versions.

Whatever rationale is agreed upon here should be updated in DEVELOPER.md.

mwtoews avatar Mar 06 '25 01:03 mwtoews

Also, NumPy doesn't strictly follow SPEC 0 (e.g. numpy-2.2.3 supports 4 versions of Python, between 3.10 to 3.13 while SPEC 0 suggests Python>=3.11).

Ah, yeah, I see they just dropped 3.10 on main in Nov https://github.com/numpy/numpy/commit/688669f81c13fc98671db97a464a57604d4e1a0b

My suggestion is that this project loosely follows SPEC 0, with possibly more flexibility on the minimum supported version (e.g. following NumPy's version support)

Thanks for this. If others are on board with the approach, I can update the dev docs. In that case, do you see any reason not to go ahead and drop 3.9 and 3.10 in one go?

wpbonelli avatar Mar 06 '25 01:03 wpbonelli

Ah, yeah, I see they just dropped 3.10 on main in Nov numpy/numpy@688669f

Aha, so they do follow SPEC 0, but the reason why they just released a version with Python 3.10 is because their 2.2.x release series started with Python 3.10 support, and the latest release was a maintenance release from a maintenance branch. Makes sense now.

Thanks for this. If others are on board with the approach, I can update the dev docs. In that case, do you see any reason not to go ahead and drop 3.9 and 3.10 in one go?

Personally, I won't mind, and other projects have done this between minor release versions. But I suppose this depends on the development roadmap, when releases are anticipated.

mwtoews avatar Mar 06 '25 01:03 mwtoews

I think we're aiming for mostly bugfix releases in the near term, maybe a few more minor in the 3.x series. Maybe we drop 3.9 in 3.x and start following SPEC 0 for 4.x.

wpbonelli avatar Mar 07 '25 11:03 wpbonelli