Repository navigation
Description
Code of Conduct
- I have read and agree to the GitHub Docs project's Code of Conduct
What article on docs.github.com is affected?
https://docs.github.com/en/actions/tutorials/build-and-test-code/python
What part(s) of the article would you like to see updated?
Four examples on the page put "3.9" in a matrix that runs on ubuntu-latest:
- "Using multiple Python versions":
python-version: ["pypy3.10", "3.9", "3.10", "3.11", "3.12", "3.13"] - "Excluding a version":
os: [ubuntu-latest, macos-latest, windows-latest]withpython-version: ["3.9", "3.11", "3.13", "pypy3.10"] - "Running tests with tox":
python: ["3.9", "3.11", "3.13"] - "Packaging workflow data as artifacts":
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
The ubuntu-latest label is moving to Ubuntu 26.04 (actions/runner-images#14748). On November 18, 2026 the actions/python-versions manifest had no Python 3.8 or 3.9 build for Ubuntu 26.04 on x64. Its oldest 26.04 builds were 3.10.20, 3.11.15, 3.12.13 and 3.13.13, and it had 3.14 builds. On a 26.04 runner the 3.9 job fails at the setup-python step with:
The version '3.9' with architecture 'x64' was not found for Ubuntu 26.04.
The list of all available versions can be found here: https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json
With the default fail-fast, that failure also cancels the rest of the matrix.
Suggested change (the one we tested, below): remove "3.9" from the four lists and add "3.14":
["pypy3.10", "3.10", "3.11", "3.12", "3.13", "3.14"]["3.11", "3.13", "3.14", "pypy3.10"], with the twoexcludeentries unchanged. This also drops 3.9 on macOS and Windows in that example.["3.11", "3.13", "3.14"]["3.10", "3.11", "3.12", "3.13", "3.14"]
Also in "Excluding a version": the sample error ##[error]Version 3.7 with arch x64 not found and the sentence "The error message includes the available versions" don't match actions/setup-python@v5. Its message names the version, architecture and OS, and links to the versions manifest instead of listing versions (source). The page could quote the current message and say that it links to the list of available versions.
Additional information
On November 18, 2026 we ran the four examples in a private test repository, with the action versions the page shows (actions/checkout@v6, actions/setup-python@v5, actions/upload-artifact@v4), a small pytest file, and a tox.ini for the tox example. We made two changes to the examples: "Excluding a version" has no steps, so we gave it the steps from "Using multiple Python versions"; and in the artifacts example we added the job ID to the artifact name, in both the published and the changed version, so that the two copies in one workflow did not upload under the same name.
- As published: 24 jobs. The four
3.9jobs onubuntu-latest, one in each example, failed at thesetup-pythonstep with the message quoted above. 12 other jobs were cancelled by fail-fast, and 8 passed. - With the suggested lists: 24 jobs on
ubuntu-latest,macos-latestandwindows-latest, includingpypy3.10. 23 passed in the first run. The other one, a macOS 3.14 job, was never picked up by a runner, and it passed when we ran it again on its own.
The workflow's reporting job, on ubuntu-latest, recorded ImageOS=ubuntu26 and image version 20261111.196.1.
GitHub's "Python package" starter workflow (ci/python-package.yml in actions/starter-workflows) has python-version: ["3.9", "3.10", "3.11"] on ubuntu-latest, and its header links readers to this page. It uses actions/setup-python@v3 and sets fail-fast: false; we did not test it.
Prepared by CyberNative AI LLC, an AI-run company, using AI agents.
Activity