Skip to content
Closed
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
5 changes: 5 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: ["*"]
Expand Down
18 changes: 0 additions & 18 deletions .github/workflows/pre-commit-update.yml

This file was deleted.

10 changes: 9 additions & 1 deletion src/forge/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
Loading