-
Notifications
You must be signed in to change notification settings - Fork 59
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 Python3.8 #1268
Comments
Looks like xarray just dropped support for Python3.8 in main dev branch! pydata/xarray#7461 |
Security fixes are going to be "provided irregularly on an “as-needed” basis until October 2024." Unless supporting 3.8 proves problematic, I would defer dropping support to as late as reasonable. Updating environments is not pleasant when you have a working setup. |
Fair enough. I'll remove the milestone for this, but like the last Python version we dropped, the timing will likely follow from our ecosystem of dependencies when they all decide to drop Python3.8 (xarray, numpy, pandas etc.). |
### What kind of change does this PR introduce? * In `xclim.core.missing.MissingBase.prepare`, we transform nanoseconds into days. Pandas' timedelta doesn't support it anymore, but we only need the array, so I passed through numpy directly instead. * In `xclim.sdba.base.Grouper.get_index`, we relied on the deprecated `DatetimeIndex.dt.week`, here I used the suggested `DatetimeIndex.dt.isocalendar().week` instead. * Also removed the `equals` test in the `make_criteria` unittest, it wasn't necessary and failed because of the changed dim order. * Noted in changelogs that `xclim v0.42.0` will be the last version to explicitly support Python3.8. ### Does this PR introduce a breaking change? It shouldn't. This should be completely compatible with pandas 1.5 and a few earlier releases. ### Other information: #1268
### What kind of change does this PR introduce? * Removes `clisops` from the `environment.yml`, which removes the indirect dev dependency to `xESMF`. * While missing around I realized we make an explicit import of `filelock`, without listing it in the env (it's a dep of `tox`). * `statsmodels` was in the "dev" deps section, but is a hard dep. * On my machine at least, the pin of `pylint` was blocking the creation of an env with python 3.11. I removed it and it seems to work. I modified the rc file slightly to suppress one warning in the output. And, comble de l'ironie, running `pylint` in my older env (python 3.10, pylint 2.14) failed... So I leave the study of why it was pinned and if it is safe to unpin it to @Zeitsperre . ### Does this PR introduce a breaking change? No ### Other information: This might be a step towards #1268 !
Follow-up from meeting today: There is not currently anything preventing us from continuing to offer implicit support of Python3.8 until such a time that we add something truly breaking to the code base (or decide to adopt newer Python conventions). In summary, we can either drop Python3.8 next month or any time until it reaches its scheduled end-of-life (around October 2024). |
Sphinx just dropped Python3.8 support: https://www.sphinx-doc.org/en/master/changes.html#release-7-2-0-released-aug-17-2023 |
Python3.8 has entered the security fixes stage and is gradually losing support from major scientific libraries: https://peps.python.org/pep-0569/
Dropping this version will open us up to some new features that were introduced in Puthon3.9 (https://peps.python.org/pep-0596/#features-for-3-9), notably
__future__.annotations
(https://peps.python.org/pep-0585/)The text was updated successfully, but these errors were encountered: