From 68cc7eb618176b2ccfd928770cdebef42c0714f3 Mon Sep 17 00:00:00 2001 From: Julien Cristau Date: Wed, 7 Oct 2026 17:11:48 +0000 Subject: [PATCH] ci: verify run-task and fetch-content still support Python 3.8 Consumers can run these scripts with system Python versions older than taskgraph's own minimum. Add a check task that statically scans them with vermin and smoke tests them under a real 3.8 interpreter. --- pyproject.toml | 1 + taskcluster/kinds/check/kind.yml | 12 ++++++++++++ taskcluster/kinds/docker-image/kind.yml | 2 +- uv.lock | 13 ++++++++++++- 4 files changed, 26 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index a5a628d5b..b37da0b45 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,6 +52,7 @@ dev = [ "sphinx-book-theme >=1.1.4", "sphinx-taskgraph>=0.1.0", "sphinxcontrib-mermaid>=1.0.0", + "vermin>=1.8.0", "zstandard>=0.25.0", ] diff --git a/taskcluster/kinds/check/kind.yml b/taskcluster/kinds/check/kind.yml index a71bbe422..2b6f1bde3 100644 --- a/taskcluster/kinds/check/kind.yml +++ b/taskcluster/kinds/check/kind.yml @@ -39,3 +39,15 @@ tasks: run: command: >- uv run --all-extras pyright + scripts-min-python: + description: >- + Verify that the standalone scripts consumers run inside tasks + still support the oldest Python they're used with + treeherder: + symbol: check(scripts-min-python) + run: + command: >- + uv run vermin --target=3.8- --violations --eval-annotations --no-tips + src/taskgraph/run-task/run-task src/taskgraph/run-task/fetch-content && + uv run --no-project --python 3.8 python src/taskgraph/run-task/run-task --help > /dev/null && + uv run --no-project --python 3.8 python src/taskgraph/run-task/fetch-content --help > /dev/null diff --git a/taskcluster/kinds/docker-image/kind.yml b/taskcluster/kinds/docker-image/kind.yml index 9523b2035..b4a75bc26 100644 --- a/taskcluster/kinds/docker-image/kind.yml +++ b/taskcluster/kinds/docker-image/kind.yml @@ -27,7 +27,7 @@ tasks: symbol: I(py) parent: run-task args: - PYTHON_VERSIONS: "3.14t 3.14 3.13 3.12 3.11 3.10 3.9" + PYTHON_VERSIONS: "3.14t 3.14 3.13 3.12 3.11 3.10 3.9 3.8" run-task: symbol: I(rt) args: diff --git a/uv.lock b/uv.lock index 220189079..fc3b056c8 100644 --- a/uv.lock +++ b/uv.lock @@ -1,5 +1,5 @@ version = 1 -revision = 5 +revision = 3 requires-python = ">=3.9" resolution-markers = [ "python_full_version >= '3.12'", @@ -3652,6 +3652,7 @@ dev = [ { name = "sphinx-taskgraph" }, { name = "sphinxcontrib-mermaid", version = "1.2.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, { name = "sphinxcontrib-mermaid", version = "2.1.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, + { name = "vermin" }, { name = "zstandard" }, ] @@ -3691,6 +3692,7 @@ dev = [ { name = "sphinx-book-theme", specifier = ">=1.1.4" }, { name = "sphinx-taskgraph", editable = "packages/sphinx-taskgraph" }, { name = "sphinxcontrib-mermaid", specifier = ">=1.0.0" }, + { name = "vermin", specifier = ">=1.8.0" }, { name = "zstandard", specifier = ">=0.25.0" }, ] @@ -3846,6 +3848,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/38/0c/b54a4fdd7f90a3af8b02ebc9ce6712c2c208b7926a2f7bad95c33ebbe943/uvicorn-0.54.0-py3-none-any.whl", hash = "sha256:505bdb0f318731d45f1f712071fc781a8981f6847a31c902c9f5e652d4f67faf", size = 87427, upload-time = "2026-09-25T06:52:35.829Z" }, ] +[[package]] +name = "vermin" +version = "1.8.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/24/7b/2c1b403f2a844e1acb36694fc336e323df742f7f752edb4188311ad43f9e/vermin-1.8.0.tar.gz", hash = "sha256:3621955ac2a2950175c5b4a9b2fc3bd24bd416da0388893c9eb6971264e4ca1f", size = 99913, upload-time = "2025-11-20T17:29:31.509Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e6/fd/6d2167767488e162efd01300a679c7f7d913dbb65baa0b15760ebb369854/vermin-1.8.0-py3-none-any.whl", hash = "sha256:6f2b98ad697a16ed3442e81a0f0baabfc38c185b78aaab1b1fecd87bdd6640b8", size = 98030, upload-time = "2025-11-20T17:29:29.931Z" }, +] + [[package]] name = "virtualenv" version = "21.14.5"