Drop support for Python 3.9#97
Open
aclerc wants to merge 26 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates wind-up to drop Python 3.9 support (aligning with upstream dependency support) and makes matplotlib default to a headless-safe backend to avoid X-server related failures during unattended runs.
Changes:
- Drop Python 3.9 support across packaging/tooling and migrate
strict_zipbackport usage tozip(..., strict=True). - Default matplotlib backend to
Aggonimport wind_upunlessMPLBACKENDis explicitly set, and add tests for this behavior. - Minor cleanups: plotting arg style tweaks, small typing improvements, and README updates (methodology link + backend note).
Reviewed changes
Copilot reviewed 23 out of 24 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| wind_up/scada_funcs.py | Replace strict_zip with built-in zip(..., strict=True) after dropping Py3.9. |
| wind_up/pp_analysis.py | Make bootstrap override handling explicit (is not None). |
| wind_up/plots/scada_funcs_plots.py | Replace strict_zip with zip(..., strict=True). |
| wind_up/plots/pp_analysis_plots.py | Minor matplotlib call style tweak (ylim tuple). |
| wind_up/plots/northing_plots.py | Minor matplotlib call style tweak (xlim tuple). |
| wind_up/plots/data_coverage_plots.py | Minor matplotlib call style tweaks (xlims tuple, ylim tuple). |
| wind_up/plots/combine_results_plots.py | Replace strict_zip with zip(..., strict=True) and enforce strictness. |
| wind_up/optimize_northing.py | Replace strict_zip with zip(..., strict=True). |
| wind_up/northing.py | Use circ_median directly as a groupby aggfunc. |
| wind_up/models.py | Replace strict_zip with zip(..., strict=True) in YAML config construction. |
| wind_up/backporting.py | Remove backport module now that Py3.10+ is required. |
| wind_up/init.py | Set default matplotlib backend to Agg unless MPLBACKEND is set. |
| tests/test_smart_data.py | Update tests to use zip(..., strict=True). |
| tests/test_rolling_circ_median.py | Small refactor: pass function directly into rolling.apply. |
| tests/test_rolling_circ_mean.py | Minor lambda cleanup in expected-series computation. |
| tests/test_backporting.py | Remove tests for backported strict_zip (module removed). |
| tests/test_backend.py | Add regression tests verifying backend defaulting + env override behavior. |
| tests/pp_analysis/test_cook_pp.py | Use zip(..., strict=True) in test data construction. |
| README.md | Document Py3.10–3.13 support, add methodology link + backend note. |
| pyproject.toml | Bump version, require Py3.10+, adjust tooling config and dependency constraints. |
| examples/smarteole_utils.py | Modernize typing to Py3.10 union (` |
| examples/kelmarsh_kaggle.py | Improve typing annotation for automl_settings. |
| .github/workflows/lint-and-test.yaml | Update CI matrix to test Python 3.10 and 3.13. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I saw an error
XIO: fatal IO error 0 (Success) on X server "localhost:10.0"when trying to run wind-up on a server overnight. Typical useage of wind-up is fine with Agg as mpl backend so make that happen by default.During this PR I ran
uv lock -Uand found the latest matplotlib has dropped support for Python 3.9. 3.9 became EOL in late 2025 so makes sense to drop it now. I looked in to supporting 3.14 but that deserves another PR.