Maintaining
Adding Support for a New Python Version
When adding support for a new Python version (e.g., Python 3.15):
-
Upgrade PyO3: Check if the current PyO3 version supports the new Python version. If not, upgrade PyO3 in
Cargo.tomlto the latest version that supports it. PyO3 typically adds support for new Python versions within a few releases. -
Update CI workflow (
.github/workflows/ci.yml): Add the new Python version to thepython-versionmatrix to ensure tests run against it:yaml python-version: ["3.13", "3.14", "3.15"] -
Update release workflow (
.github/workflows/release.yml): Add the new Python version to thepython-versionmatrix to build wheels for it:yaml python-version: ["3.13", "3.14", "3.15"] -
Update
pyproject.toml: Verify thatrequires-pythonincludes the new version (e.g.,>=3.13already covers 3.14+).