Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop Python 3.8 and 3.9 Support #345

Open
wants to merge 5 commits into
base: release_v2.0
Choose a base branch
from

Conversation

JostMigenda
Copy link
Member

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.)

Will reach EOL this autumn.
NumPy and other major scientific Python packages have already dropped support in mid-2023, see https://numpy.org/neps/nep-0029-deprecation_policy.html
typing.Set, typing.List and typing.Dict are deprecated in Python 3.9 and later
@JostMigenda JostMigenda force-pushed the JostMigenda/UpdatePythonSupport branch from 617ee4c to 695ff68 Compare June 17, 2024 17:13
@JostMigenda
Copy link
Member Author

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
Copy link
Contributor

Sheshuk commented Jun 18, 2024

@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.

NumPy and other major scientific Python packages have already dropped support in April 2024, see https://numpy.org/neps/nep-0029-deprecation_policy.html
shorthand syntax doesn’t work with strings; and we can’t use the class itself within its own definition
@JostMigenda
Copy link
Member Author

Done and ready for review!

@JostMigenda JostMigenda changed the title Drop Python 3.8 Support Drop Python 3.8 and 3.9 Support Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants