SNEWS2 / snewpy

A Python package for working with supernova neutrinos
https://snewpy.readthedocs.io
BSD 3-Clause "New" or "Revised" License
24 stars 17 forks source link

Drop Python 3.8 and 3.9 Support #345

Open JostMigenda opened 2 weeks ago

JostMigenda commented 2 weeks ago

This PR drops support for Python 3.8 and cleans up some backwards compatibility code.

Python 3.8 is scheduled to reach end-of-life this autumn; and many major packages in the scientific Python ecosystem already started dropping 3.8 support since April 2023.

@Sheshuk: If there are any places in the SNEWPY 2.0 code where support for Python 3.9 is holding us back, we can consider dropping 3.9 support as well. (NumPy and others started doing that in April 2024.)

JostMigenda commented 2 weeks ago

Note: The integration tests are currently expected to fail on the release_v2.0 branch, because of ongoing work on the flavour implementation. That should not stop us from reviewing and merging this PR.

Sheshuk commented 2 weeks ago

@Sheshuk: If there are any places in the SNEWPY 2.0 code where support for Python 3.9 is holding us back, we can consider dropping 3.9 support as well. (NumPy and others started doing that in April 2024.)

Yes, let's do that! 3.10 introduces easier syntax for type annotations (which we should use more), and pattern matching which is a clear and nice alternative to many if-else checks. It will be nice to use those features in our code.

JostMigenda commented 2 weeks ago

Done and ready for review!