From 517e2a581d426f9f04b9ae65c1b93f47b4af42fb Mon Sep 17 00:00:00 2001 From: Jesse Mansfield Date: Fri, 30 Jan 2026 15:44:51 +1100 Subject: [PATCH 1/2] Adds download support to download / download_with_retries --- dbt_common/clients/system.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/dbt_common/clients/system.py b/dbt_common/clients/system.py index cd38ba10..c692b072 100644 --- a/dbt_common/clients/system.py +++ b/dbt_common/clients/system.py @@ -581,9 +581,12 @@ def run_cmd(cwd: str, cmd: List[str], env: Optional[Dict[str, Any]] = None) -> T def download_with_retries( - url: str, path: str, timeout: Optional[Union[float, tuple]] = None + url: str, + path: str, + timeout: Optional[Union[float, tuple]] = None, + proxies: Optional[Dict[str, str]] = None, ) -> None: - download_fn = functools.partial(download, url, path, timeout) + download_fn = functools.partial(download, url, path, timeout, proxies) connection_exception_retry(download_fn, 5) @@ -591,10 +594,11 @@ def download( url: str, path: str, timeout: Optional[Union[float, Tuple[float, float], Tuple[float, None]]] = None, + proxies: Optional[Dict[str, str]] = None, ) -> None: path = convert_path(path) connection_timeout = timeout or float(os.getenv("DBT_HTTP_TIMEOUT", 10)) - response = requests.get(url, timeout=connection_timeout) + response = requests.get(url, timeout=connection_timeout, proxies=proxies) with open(path, "wb") as handle: for block in response.iter_content(1024 * 64): handle.write(block) From edfc8366fb1560f701861500fcdc674a7d505aad Mon Sep 17 00:00:00 2001 From: Jesse Mansfield Date: Tue, 10 Feb 2026 09:49:43 +1100 Subject: [PATCH 2/2] changie file --- .changes/unreleased/Features-20260210-094912.yaml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changes/unreleased/Features-20260210-094912.yaml diff --git a/.changes/unreleased/Features-20260210-094912.yaml b/.changes/unreleased/Features-20260210-094912.yaml new file mode 100644 index 00000000..59a89ce1 --- /dev/null +++ b/.changes/unreleased/Features-20260210-094912.yaml @@ -0,0 +1,6 @@ +kind: Features +body: adds proxies to download function, necessary for running DBT without setting global proxy vars +time: 2026-02-10T09:49:12.7780767+11:00 +custom: + Author: mansfieldj3 + Issue: "348"