Repository navigation
Post-release: drop Python 3.9 support and migrate CI to Python 3.10+ - #1081
Conversation
d3b382b to
4eaa7f4
Compare
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
3 open issues
The matrix values loaded from YAML may be non-strings (e.g., an unquoted3.10can deserialize as… · New This collects allProgramming Language :: Python :: ...trove classifiers, including common… · New Usingpipdirectly can occasionally target a different environment than the configuredpython… · New
What changed in this PR
Drops Python 3.9 support across package metadata and CI, aligning workflow interpreter selections with Requires-Python and adding regression checks to prevent future drift.
Changes:
- Update
requires-pythonto>=3.10and remove the Python 3.9 classifier. - Update CI lint/test matrices and wheel build selector to exclude Python 3.9 and run linting on Python 3.12.
- Add workflow regression tests to enforce consistency between metadata and CI interpreter versions.
| File | Description |
|---|---|
| pyproject.toml | Bumps minimum supported Python to 3.10 and removes the 3.9 trove classifier. |
| .github/workflows/ci.yml | Updates lint/test Python versions and runs new workflow regression tests in CI. |
| .github/workflows/publish-package.yml | Removes CPython 3.9 from the pinned (LKG) cibuildwheel build selector. |
| .github/workflows/tests/test_python_support.py | Adds tests to keep Requires-Python, classifiers, and CI matrices in sync. |
Review effort: Lite
4eaa7f4 to
29eff85
Compare
|
Will this test from branch kebatt/temporary-python39-ci def test_python39_linux_runner_only(job_name, os, python_version):
"""Pin only Python 3.9 Linux jobs to Ubuntu 24.04, preserving all other matrix runners.
Parse the workflow's restricted equality/AND/OR selector and evaluate its captured
operands for both matrix jobs, including versions used by notebook LKG entries.
This remains valid when Python 3.9 is removed from the matrices after the release.
"""
selector = CI["jobs"][job_name]["runs-on"]
match = re.fullmatch(
r"\$\{\{ matrix\.os == '([^']+)' && matrix\.python-version == '([^']+)' "
r"&& '([^']+)' \|\| matrix\.os \}\}",
selector,
)
assert match is not None, f"Unexpected runner selector: {selector}"
selected_os, selected_version, pinned_runner = match.groups()
runner = pinned_runner if os == selected_os and python_version == selected_version else os
expected = "ubuntu-24.04" if os == "ubuntu-latest" and python_version == "3.9" else os
assert runner == expectedstill be necessary once we fully drop python 3.9? |
e80fbfb to
2a29bc5
Compare
@fverac - good catch, removed that from this follow-up PR. |
2a29bc5 to
dd1c636
Compare
Require Python 3.10+, run linting on 3.12, and remove Python 3.9 from the test and LKG-generation matrices and pinned wheel selector. cibuildwheel reads requires-python to filter unsupported interpreters in both pinned and floating builds. Keep dependency floors and LKG snapshots unchanged to limit overlap with #1055. Add documented workflow regression checks. Co-authored-by: Copilot App <[email protected]> Signed-off-by: Keith Battocchi <[email protected]>
dd1c636 to
c34588c
Compare


Release ordering
Post-release layer: keep this draft until the bugfix release is published.
Native stack order:
main-> #1082 -> this PR. Merge #1082 first to unblock the bugfix release while preserving Python 3.9 support; this upper layer intentionally drops that support afterward. Do not merge the whole stack before the release.Summary
${{ matrix.os }}and remove the temporary Python 3.9 runner regression test, since its workaround is no longer needed.project.requires-python, excluding Python 3.8 and 3.9 in both LKG and floating builds without additionalCIBW_SKIPpatterns.Linting on Python 3.12 and the shared workflow-test command are already provided by #1082. This PR adds one migration commit above that lower layer. Dependency lower bounds and existing LKG snapshots are deliberately unchanged. Python 3.10 remains supported to avoid an unnecessary additional compatibility break.
Interaction with #1055
Kept separate from #1055's dependency-profile and per-cell LKG redesign. When rebasing #1055 onto this work:
test_ci_runners.pyaccordingly.store-reqs-per-env.CIBW_SKIPstays unchanged; Requires-Python handles interpreter exclusions.This layer's checks live in a separate
test_python_support.pyfile to avoid overlapping its existing workflow tests.