Skip to content

ci: 👷 Test every supported Python version and recommend 3.14 - #252

Open
aka-khannaji wants to merge 1 commit into
ShisatoYano:mainfrom
aka-khannaji:ci/python-version-policy
Open

aka-khannaji wants to merge 1 commit into
ShisatoYano:mainfrom
aka-khannaji:ci/python-version-policy

Conversation

@aka-khannaji

@aka-khannaji aka-khannaji commented Nov 21, 2026 •

Copy link
Copy Markdown

Summary

Defines a Python version policy and applies it, as described in #189. CI now
tests every supported version (3.11-3.15) on Linux, macOS and Windows, and the
recommended version moves to 3.14.

Closes #189

How I checked it works

  • pytest -l --durations=0 on Python 3.15.2, the only interpreter installed
    here: 130 passed, 1 warning in 532.28s.
  • Parsed all six workflow files with PyYAML and read back the three matrices:
    ['3.11', '3.12', '3.13', '3.14', '3.15'] on Linux, macOS and Windows.
  • Checked PyPI wheel coverage for the new matrix. NumPy 2.5.5, SciPy 1.18.1 and
    matplotlib 3.11.2 publish cp315 wheels for Windows amd64, macOS arm64 and
    manylinux x86_64/aarch64, and CasADi 3.8.2 publishes cp311-abi3 wheels, so
    3.15 installs the requirements. Python 3.11 has no wheels for those NumPy and
    SciPy releases; pip resolves the newest releases that still support it, which
    the policy states explicitly.
  • Searched the source and tests for syntax and APIs that need Python 3.12+ and
    found none, so 3.11 should run the suite as-is.
  • Searched for 3.13: the only remaining occurrences are inside the new CI
    matrices.

Not run locally:

  • The 3.11-3.14 jobs themselves. This host only has Python 3.15, so those matrix
    entries are exercised for the first time by this PR's CI.
  • A complete book build. sphinx-build -W stops while drawing
    doc/optimal_control/figures/mppi_samples.py with alpha (1.0000000000000002) is outside 0-1 range. That line computes
    (0.9 * w) / weights.max(), which rounds just above 1 on this machine; the
    Book workflow is green on main and this PR does not touch that file, so I
    left it alone. The Book job on this PR builds the changed page.

Images

Docs, CI and configuration only: no change under src/, so there is nothing to
show.

Book

  • This PR doesn't change code that the book describes, or I updated those pages

The only book change is the sentence in doc/ARCHITECTURE.md that points at the
new policy. Book.yml also moves to 3.14: the issue named the gallery workflow
but not this one, and leaving the book build on 3.13 would contradict the
recommended-version rule.

- add the supported-version policy and its yearly review to
  HOWTOCONTRIBUTE.md, and link it from doc/ARCHITECTURE.md (ShisatoYano#189)
- run the Linux, macOS and Windows test matrices on Python 3.11-3.15
- move the recommended version to 3.14 in the README, Dockerfile,
  book build and examples-gallery workflows

Closes ShisatoYano#189

This branch has not been deployed

No deployments
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.

Python version policy: test all supported versions and update once a year

1 participant