pvlib-python icon indicating copy to clipboard operation
pvlib-python copied to clipboard

retire support for python 3.7

Open cwhanse opened this issue 1 year ago • 5 comments

Python 3.7 reached end-of-life on 2023-06-27. I propose we remove support for python 3.7 with pvlib-python v0.11.0

cwhanse avatar Feb 13 '24 15:02 cwhanse

Sounds good to me.

AdamRJensen avatar Feb 13 '24 16:02 AdamRJensen

What's the rush?

adriesse avatar Feb 13 '24 20:02 adriesse

One reason to drop 3.7 is to prevent excessive accumulation of supported versions: python releases new versions annually, and it's been more than a year since we dropped a version.

kandersolar avatar Feb 14 '24 14:02 kandersolar

If you make 3.8 your minimum supported version you could also use some of the features that came in 3.8. This _numdiff function does a bunch of math with lots of repeated chunks. For example, a0[:, 0] * a0[:, 1] is calculated 9 times. You could set up a mini library of chunks and then reference those variables now, but a more concise way would be to use py3.8's walrus operator. The first reference of the above gets simultaneously assigned to a variable: (col0Xcol1 := a0[:, 0] * a0[:, 1]) Then all the subsequent repetitions use that col0Xcol1 variable. There would be other things too, like being able to reverse a dictionary. I've seen other libraries that have an official policy of supporting the last X python versions. X = 6 (i.e. py 3.7 - 3.12) seems like a lot.

alexandermorgan avatar Mar 14 '24 10:03 alexandermorgan

I suggest we move this item up to 0.10.5, and plan to release 0.10.5 soon (perhaps even this week) for #2026.

Waiting for 0.11.0 would put the desire to drop 3.7 ASAP (#2023) in conflict with wanting to wait at least a year before removing the 0.10.0 (released June 2023) deprecations set to expire in 0.11.0.

kandersolar avatar Apr 30 '24 23:04 kandersolar