Skip to content

CI failing on Ubuntu 26.04 because workflow does not pin Python version #175

Open

Description

@yhong123

Summary

CI unit tests have been failing since mid-November because the GitHub Actions runner image behind ubuntu-latest was updated from Ubuntu 24.04 to Ubuntu 26.04. The workflow currently does not explicitly configure a Python version, so it uses whatever python3 version is provided by the runner image. Ubuntu 26.04 ships with Python 3.14 as the system default, which is outside the version range currently declared in pyproject.toml's >=3.10,<3.14.

Evidence

Recent failing runs:
#146 post-merge run: https://github.com/SAFEHR-data/datafaker/actions/runs/43919756559
#170 post-merge run: https://github.com/SAFEHR-data/datafaker/actions/runs/44494295165
#174 PR run: https://github.com/SAFEHR-data/datafaker/actions/runs/44510097692

Root cause

Our workflow .github/workflows/tests.yml defines:

env:
     PYTHON_VERSION: "3.10"

but this variable is never actually used. As a result, the workflow has effectively been running against whichever Python version happens to be the default on the GitHub Actions runner image. This went unnoticed while ubuntu-latest used a supported Python version, but started failing once the runner image moved to Python 3.14 and exceeded the current requirement specified in pyproject.toml:
python = ">=3.10,<3.14"

Possible solutions

Option 1: Pin CI to Python 3.10

Add an actions/setup-python step to the workflow tests.yaml, right after checkout, so CI pins to 3.10 explicitly instead of drifting with the runner image:

- name: Set up Python
  uses: actions/setup-python@v5
  with:
    python-version: ${{ env.PYTHON_VERSION }}

This keeps CI aligned with the currently supported version range and avoids future runner-image drift.

Option 2: Add Python 3.14 support

Update pyproject.toml and any dependencies/tests as needed to support Python 3.14. This would require verifying that Datafaker and all dependencies are compatible with Python 3.14 before updating the supported version range.

Activity

  1. samcunliffe commented on Nov 19, 2026

    @samcunliffe
    Member

    Python 3.10 reached end of life last month.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions