Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ dependencies = [
"appdirs>=1.4",
"cookiecutter~=2.1",
"json-e>=2.7",
"mozilla-repo-urls",
"mozilla-repo-urls>=0.1.1",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the last version that supports Python 3.9 and 3.10..

This might bite us eventually if we ever need to depend on a new change there.

"PyYAML>=5.3.1",
"redo>=2.0",
"requests>=2.25",
Expand All @@ -36,26 +36,26 @@ dependencies = [

[dependency-groups]
dev = [
"coverage",
"mock",
"pre-commit",
"pyright",
"pytest",
"pytest-mock",
"pytest-taskgraph",
"responses",
"sphinx",
"sphinx-autobuild",
"sphinx-argparse",
"sphinx-book-theme >=1",
"sphinx-taskgraph",
"sphinxcontrib-mermaid",
"zstandard",
"coverage>=7.10.7",
"mock>=5.2.0",
"pre-commit>=4.3.0",
"pyright>=1.1.406",
"pytest>=8.4.2",
"pytest-mock>=3.15.1",
"pytest-taskgraph>=0.2.0",
"responses>=0.25.8",
"sphinx>=7.4.7",
"sphinx-autobuild>=2024.04.16",
"sphinx-argparse>=0.4.0",
"sphinx-book-theme >=1.1.4",
"sphinx-taskgraph>=0.1.0",
"sphinxcontrib-mermaid>=1.0.0",
"zstandard>=0.25.0",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just put a minimum bound to the maximum version that still support 3.9 for these. They're just dev dependencies, so no need to keep a wide constraint.

]

[project.optional-dependencies]
load-image = ["zstandard"]
orjson = ["orjson"]
load-image = ["zstandard>=0.23.0"]
orjson = ["orjson>=3"]

[project.scripts]
taskgraph = "taskgraph.main:main"
Expand Down
1 change: 1 addition & 0 deletions taskcluster/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ treeherder:
'check': 'Checks and lints'
'doc': 'Documentation tasks'
'unit': 'Unit test tasks'
'integration': 'Integration test tasks'

index:
products:
Expand Down
1 change: 1 addition & 0 deletions taskcluster/kinds/codecov/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ tasks:
with-attributes:
# exclude free-threaded python until it is officially supported
python: ["314", "313", "312", "311", "310", "39"]
resolution: default
fetches:
test:
- artifact: coverage.py{matrix[python]}
Expand Down
2 changes: 2 additions & 0 deletions taskcluster/kinds/complete/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ tasks:
with-attributes:
# exclude free-threaded python until it is officially supported
python: ["314", "313", "312", "311", "310", "39"]
# exclude integration tests that ignore the lockfile
resolution: default
# needs to be added explicitly until we can drop the `with-attributes` above
dependencies:
check-type: check-type
64 changes: 3 additions & 61 deletions taskcluster/kinds/test/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,64 +13,6 @@ transforms:
kind-dependencies:
- docker-image

task-defaults:
attributes:
artifact_prefix: public
retrigger: true
code-review: true
worker:
max-run-time: 1800
env:
PYTHONUTF8: "0"
PYTHONCOERCECLOCALE: "0"
HGENCODING: "utf-8"
treeherder:
kind: test
tier: 1
run:
using: run-task
cwd: '{checkout}'
use-caches: [checkout, uv]

tasks:
unit-linux:
description: "Run unit tests with py{matrix[python]} on Linux"
matrix:
set-name: "unit-py{matrix[python]}"
substitution-fields: [description, run.command, treeherder, worker, attributes]
python: ["314t", "314", "313", "312", "311", "310", "39"]
attributes:
python: "{matrix[python]}"
platform: linux
worker-type: t-linux
worker:
docker-image: {in-tree: python}
artifacts:
- type: file
path: "/builds/worker/artifacts/coverage"
name: "public/coverage.py{matrix[python]}"
env:
LC_ALL: "C"
UV_PYTHON: "{matrix[python]}"
treeherder:
platform: test-linux/opt
symbol: unit(py{matrix[python]})
run:
command: >-
uv run coverage run --data-file /builds/worker/artifacts/coverage --context=py{matrix[python]} -m pytest -vv

unit-win:
description: "Run unit tests with python on Windows"
attributes:
platform: windows
worker-type: t-windows
worker:
taskcluster-proxy: true
treeherder:
platform: test-win/opt
symbol: unit(py)
run:
command: >-
python3 -V &&
powershell -ExecutionPolicy ByPass -c 'irm https://astral.sh/uv/install.ps1 | iex' &&
~/.local/bin/uv.exe run -m pytest -vv
tasks-from:
- linux.yml
- windows.yml
71 changes: 71 additions & 0 deletions taskcluster/kinds/test/linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
task-defaults:
matrix:
substitution-fields:
- attributes
- description
- run.command
- treeherder
- worker
attributes:
artifact_prefix: public
retrigger: true
code-review: true
python: "{matrix[python]}"
platform: linux
resolution: default
worker-type: t-linux
worker:
docker-image: {in-tree: python}
max-run-time: 1800
env:
PYTHONUTF8: "0"
PYTHONCOERCECLOCALE: "0"
HGENCODING: "utf-8"
LC_ALL: "C"
UV_PYTHON: "{matrix[python]}"
treeherder:
platform: test-linux/opt
kind: test
tier: 1
run:
using: run-task
cwd: '{checkout}'
use-caches: [checkout, uv]

unit:
description: "Run unit tests with py{matrix[python]} on Linux"
matrix:
set-name: "unit-py{matrix[python]}"
substitution-fields: [description, run.command, treeherder, worker, attributes]
python: ["314t", "314", "313", "312", "311", "310", "39"]
worker:
docker-image: {in-tree: python}
artifacts:
- type: file
path: "/builds/worker/artifacts/coverage"
name: "public/coverage.py{matrix[python]}"
treeherder:
symbol: unit(py{matrix[python]})
run:
command: >-
uv run coverage run --data-file /builds/worker/artifacts/coverage --context=py{matrix[python]} -m pytest -vv

integration:
description: "Run unit tests with py{matrix[python]} on Linux with resolution {matrix[resolution]}"
attributes:
resolution: "{matrix[resolution]}"
matrix:
set-name: "integration-py{matrix[python]}-deps-{matrix[resolution]}"
python: ["314", "39"]
resolution: ["highest", "lowest-direct"]
exclude:
- python: "314"
resolution: "lowest-direct"
- python: "39"
resolution: "highest"

treeherder:
symbol: integration(py{matrix[python]}-{matrix[resolution]})
run:
command: >-
uv run --isolated --resolution={matrix[resolution]} pytest -vv
34 changes: 34 additions & 0 deletions taskcluster/kinds/test/windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
task-defaults:
attributes:
artifact_prefix: public
retrigger: true
code-review: true
worker:
max-run-time: 1800
env:
PYTHONUTF8: "0"
PYTHONCOERCECLOCALE: "0"
HGENCODING: "utf-8"
treeherder:
kind: test
tier: 1
run:
using: run-task
cwd: '{checkout}'
use-caches: [checkout, uv]

unit-win:
description: "Run unit tests with python on Windows"
attributes:
platform: windows
worker-type: t-windows
worker:
taskcluster-proxy: true
Comment on lines +25 to +26
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm surprised this enables the proxy, I wouldn't have expected it to be needed (I know you're just moving this code here, I just hadn't noticed this before).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly I didn't notice either. @bhearsum was this intentional?

I'll leave it in this PR, we can attempt disabling in a follow-up

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have recollection of needing it. It could be copy/paste failure, or something I failed to document. I've opened #900 to remove it, and we'll see if that passes tests.

treeherder:
platform: test-win/opt
symbol: unit(py)
run:
command: >-
python3 -V &&
powershell -ExecutionPolicy ByPass -c 'irm https://astral.sh/uv/install.ps1 | iex' &&
~/.local/bin/uv.exe run -m pytest -vv
Loading
Loading