|
| 1 | +--- |
| 2 | +name: dropping-and-or-adding-support-for-python-versions |
| 3 | +description: Update supported Python versions across CI, configs, and docs in line with the official Python support policy. Use when adding or dropping Python version support. |
| 4 | +--- |
| 5 | +This project follows the official Python support policy: https://devguide.python.org/versions/ |
| 6 | + |
| 7 | +When adding support for a new Python version |
| 8 | +1. Update `.github/workflows/ci.yml` at `jobs.software-tests.strategy.matrix.python-version`. |
| 9 | +2. Update `pyproject.toml` at `project.classifiers`. |
| 10 | +3. Update `docs/reference/changelog.md` at the top of "Unreleased changes" with: |
| 11 | + "Add support for Python 3.XX, in accordance with the official Python support policy[^1] ({gh-pr}`XXX`)". |
| 12 | + |
| 13 | +When dropping support for an end-of-life Python version |
| 14 | +1. Remove it from the CI pipeline and update the entries listed below. |
| 15 | +2. Update `docs/reference/changelog.md` under an "Unreleased changes" -> "Breaking changes" section with: |
| 16 | + "Dropped support for Python 3.XX, in accordance with the official Python support policy[^1] ({gh-pr}`XXX`)". |
| 17 | + |
| 18 | +Files to update when dropping support for a Python version |
| 19 | +- `.github/workflows/ci.yml`: `jobs.software-tests.strategy.matrix.python-version`, |
| 20 | + `jobs.static-checks.steps.with.python-version`. |
| 21 | +- `.github/workflows/release.yml`: `jobs.build.steps.with.python-version`, |
| 22 | + `jobs.github-release.steps.with.python-version`. |
| 23 | +- `.pre-commit-config.yaml`: `default_language_version.python`. |
| 24 | +- `.readthedocs.yml`: `build.tools.python`. |
| 25 | +- `AGENTS.md`: wherever relevant. |
| 26 | +- `docs/development/contributing.md`: wherever relevant. |
| 27 | +- `Makefile`: `BASE_PYTHON`. |
| 28 | +- `mypy.ini`: `python_version`. |
| 29 | +- `pyproject.toml`: `project.classifiers`, `project.requires-python`. |
| 30 | +- `pyrightconfig.json`: `pythonVersion`. |
| 31 | +- `ruff.toml`: `target-version`. |
0 commit comments