|
| 1 | +--- |
| 2 | +name: dropping-and-adding-support-for-python-versions |
| 3 | +description: "Use when adding or dropping Python version support by updating the supported Python versions across CI, configs, and docs in line with the official Python support policy." |
| 4 | +--- |
| 5 | + |
| 6 | +# Dropping and adding support for Python versions |
| 7 | + |
| 8 | +## Overview |
| 9 | + |
| 10 | +This project adheres to the official Python support policy: https://devguide.python.org/versions/ |
| 11 | + |
| 12 | +Use this skill to keep Python version support in sync with the official Python support policy by updating the project files consistently. |
| 13 | + |
| 14 | +## Workflow |
| 15 | + |
| 16 | +1. Identify the change type: add support for a new Python version or drop support for an end-of-life Python version. |
| 17 | +2. Confirm the exact Python version string (e.g., add support for 3.45) and the PR number to insert in the changelog entry (e.g., PR #1234) |
| 18 | +3. Apply the relevant changelog entry and file updates listed below. |
| 19 | + |
| 20 | +## Adding support for a new Python version |
| 21 | + |
| 22 | +1. Update `docs/reference/changelog.md` at the top of "Unreleased changes" with: |
| 23 | + > Add support for Python 3.XX, in accordance with the official Python support policy[^1] ({gh-pr}`XXX`)". |
| 24 | +2. Update the following locations: |
| 25 | + - .github/workflows/ci.yml: `jobs.software-tests.strategy.matrix.python-version` |
| 26 | + - pyproject.toml: `project.classifiers` |
| 27 | + |
| 28 | +## Dropping support for an end-of-life Python version |
| 29 | + |
| 30 | +1. Update `docs/reference/changelog.md` under "Unreleased changes" -> "Breaking changes" with: |
| 31 | + > Dropped support for Python 3.XX, in accordance with the official Python support policy[^1] ({gh-pr}`XXX`). |
| 32 | +2. Update the following locations: |
| 33 | + - .github/workflows/ci.yml: `jobs.software-tests.strategy.matrix.python-version` and `jobs.static-checks.steps.with.python-version` |
| 34 | + - .github/workflows/release.yml: `jobs.build.steps.with.python-version` and `jobs.github-release.steps.with.python-version` |
| 35 | + - .pre-commit-config.yaml: `default_language_version.python` |
| 36 | + - .readthedocs.yml: `build.tools.python` |
| 37 | + - AGENTS.md: wherever relevant |
| 38 | + - docs/development/contributing.md: wherever relevant |
| 39 | + - Makefile: `BASE_PYTHON` |
| 40 | + - mypy.ini: `python_version` |
| 41 | + - pyproject.toml: `project.classifiers`, `project.requires-python` |
| 42 | + - pyrightconfig.json: `pythonVersion` |
| 43 | + - ruff.toml: `target-version` |
0 commit comments