When updating to a new Python version or upgrading dependencies, touch all of the following locations:
Edit pyproject.toml and bump pinned versions under dependencies:
dependencies = [
"prometheus-client==0.x.y",
"proxmoxer==2.x.y",
"python-dotenv==1.x.y",
"requests==2.x.y",
]Edit pyproject.toml and bump requires-python:
requires-python = ">=3.11"Also update the classifiers list to reflect the supported versions:
classifiers = [
"Programming Language :: Python :: 3.11",
...
]Two workflows hardcode the Python version and must be updated manually:
- .github/workflows/release.yml —
python-version: "3.12" - .github/workflows/bandit.yml —
python-version: "3.12"
The following workflow uses python-version: '3.x' and picks up any available version automatically — no changes needed:
All workflow files under .github/workflows/ pin actions by commit SHA with a tag comment, e.g.:
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6To update, get the latest tag and its commit SHA for each action:
# Get latest tag
gh release view --repo <owner>/<repo> --json tagName -q '.tagName'
# Get commit SHA for that tag
gh api repos/<owner>/<repo>/commits/<tag> --jq '.sha'Then update the SHA and the tag comment in the workflow file.
Exception — slsa-framework/slsa-github-generator must be referenced by tag, not SHA (see upstream docs):
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v2.1.0Actions used across the workflows:
| Action | Workflow(s) |
|---|---|
actions/checkout |
all |
actions/dependency-review-action |
dependency-review.yml |
actions/setup-python |
release.yml, python-lint.yml, bandit.yml |
actions/upload-artifact |
release.yml, scorecard.yml |
actions/download-artifact |
release.yml |
anchore/sbom-action |
release.yml |
docker/build-push-action |
release.yml |
docker/login-action |
release.yml |
docker/metadata-action |
release.yml |
docker/setup-buildx-action |
release.yml |
github/codeql-action |
codeql.yml, scorecard.yml |
google/osv-scanner-action |
osv-scan.yml |
ossf/scorecard-action |
scorecard.yml |
sigstore/cosign-installer |
release.yml, release-verification.yml |
slsa-framework/slsa-github-generator |
release.yml (tag only) |
slsa-framework/slsa-verifier |
release-verification.yml |
softprops/action-gh-release |
release.yml |
.pre-commit-config.yaml pins the rev of each hook repository. Update all revisions to their latest tags:
pre-commit autoupdateThis updates the rev fields for all repos in .pre-commit-config.yaml:
pre-commit/pre-commit-hooksgitleaks/gitleakspsf/blackpycqa/flake8RobertCraigie/pyright-python
pip install hatch
hatch build