Skip to content

Commit 324231e

Browse files
committed
fix: make 'run-task' support Python 3.8 again
This is a temporary workaround. We need to continue supporting 3.8 in the `run-task` script until Gecko stops using the Ubuntu 18.04 base image for tasks (which comes with Python 3.8 by default).
1 parent 309413e commit 324231e

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,13 @@ repos:
4141
hooks:
4242
- id: conventional-pre-commit
4343
stages: [commit-msg]
44-
# TODO remove 'fetch-content' once Gecko no longer needs to use it with Python 3.8
44+
# TODO remove 'fetch-content' and 'run-task' once Gecko no longer needs to use
45+
# them with Python 3.8:
4546
# https://bugzilla.mozilla.org/show_bug.cgi?id=1990567#c7
4647
exclude: |
4748
(?x)^(
4849
src/taskgraph/run-task/fetch-content |
4950
src/taskgraph/run-task/robustcheckout.py |
51+
src/taskgraph/run-task/run-task |
5052
taskcluster/scripts/external_tools
5153
)

src/taskgraph/run-task/run-task

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import time
3131
import urllib.error
3232
import urllib.request
3333
from pathlib import Path
34-
from typing import Optional
34+
from typing import Dict, Optional
3535

3636
SECRET_BASEURL_TPL = "{}/secrets/v1/secret/{{}}".format(
3737
os.environ.get("TASKCLUSTER_PROXY_URL", "http://taskcluster").rstrip("/")
@@ -573,7 +573,7 @@ def git_fetch(
573573
remote: str = "origin",
574574
tags: bool = False,
575575
shallow: bool = False,
576-
env: Optional[dict[str, str]] = None,
576+
env: Optional[Dict[str, str]] = None,
577577
):
578578
args = ["git", "fetch"]
579579
if tags:

0 commit comments

Comments
 (0)