Patch which addresses this issue is attached
From d33d6796d0d8587716bbb83fdb5532070fca70e8 Mon Sep 17 00:00:00 2001 From: Sergey Popov <sergey.k...@gmail.com> Date: Mon, 3 Mar 2025 12:11:44 +0200 Subject: [PATCH] fix: httpx>=0.28.0 proxy compatibility
--- nala/downloader.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nala/downloader.py b/nala/downloader.py index b2e31e8..5fe49b7 100644 --- a/nala/downloader.py +++ b/nala/downloader.py @@ -48,6 +48,7 @@ from apt_pkg import Configuration, config from httpx import ( URL as HttpxUrl, AsyncClient, + AsyncHTTPTransport, ConnectError, ConnectTimeout, HTTPError, @@ -304,7 +305,7 @@ class Downloader: # pylint: disable=too-many-instance-attributes if common_proxy := config.find(f"Acquire::{proto}::Proxy"): # If the proxy is set to direct or false we disable it if common_proxy.lower() not in ("direct", "false"): - self.proxy[f"{proto}://"] = common_proxy + self.proxy[f"{proto}://"] = AsyncHTTPTransport(common_proxy) # The remainder of code is for proxying specific repos. Such a configuration may look like # Acquire::http::Proxy::deb.volian.org "xxx:8087" @@ -338,7 +339,7 @@ class Downloader: # pylint: disable=too-many-instance-attributes # If direct or false, disable the proxy if value.lower() in ("direct", "false"): value = None - self.proxy[f"{proto}://{key}"] = value + self.proxy[f"{proto}://{key}"] = AsyncHTTPTransport(value) async def _check_count(self, url: str) -> str: """Check the url count and return if Nala should continue.""" -- 2.47.2