diff --git a/.github/dependabot.yml b/.github/dependabot.yml index a08e426..48358cb 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -13,6 +13,11 @@ updates: patterns: ["*"] multi-ecosystem-group: "dependencies" + - package-ecosystem: "pre-commit" + directory: "/" + patterns: ["*"] + multi-ecosystem-group: "dependencies" + - package-ecosystem: "pip" directory: "/" patterns: ["*"] diff --git a/.github/workflows/pre-commit-update.yml b/.github/workflows/pre-commit-update.yml deleted file mode 100644 index 7a86d36..0000000 --- a/.github/workflows/pre-commit-update.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Update pre-commit - -on: - schedule: - - cron: "0 20 1-7 * */7" # First Sunday of the month @ 2000 UTC - # Reading this expression: At 20:00 on every day-of-month from 1 through 7 if - # it's on every 7th day-of-week, i.e. any one of the first seven days of the - # month as long as it is a Sunday. - workflow_dispatch: - -jobs: - pre-commit-update: - name: Update pre-commit - uses: beeware/.github/.github/workflows/pre-commit-update.yml@main - secrets: inherit - with: - pre-commit-source: pre-commit - create-changenote: false diff --git a/src/forge/build.py b/src/forge/build.py index 9ca2407..a0f4f37 100644 --- a/src/forge/build.py +++ b/src/forge/build.py @@ -30,6 +30,9 @@ from forge.package import Package +SOURCE_DOWNLOAD_TIMEOUT = httpx.Timeout(60.0, connect=10.0) + + class Builder(ABC): def __init__(self, cross_venv: CrossVEnv, package: Package): self.cross_venv = cross_venv @@ -88,7 +91,12 @@ def download_source(self): url = self.download_source_url() log(self.log_file, f"Downloading {url}...", end="", flush=True) self.source_archive_path.parent.mkdir(parents=True, exist_ok=True) - with httpx.stream("GET", url, follow_redirects=True) as response: + with httpx.stream( + "GET", + url, + follow_redirects=True, + timeout=SOURCE_DOWNLOAD_TIMEOUT, + ) as response: with self.source_archive_path.open("wb") as f: for i, chunk in enumerate(response.iter_bytes()): if i % 100 == 0: