Description: fix compatibility issues for httpx with proxies parameter
 The new version of httpx (httpx >= 0.24.0) no longer using the proxies parameter.
 Instead, it supports the proxy parameter.
 .
 Without this fix, running pytest results in compilation errors.
 .
Author: Rong Fu <rong.fu.cn@windriver.com>
Origin:
Bug-Debian:
Last-Update: 2025-04-25
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
Index: python-duckpy-3.2.0/duckpy/__init__.py
===================================================================
--- python-duckpy-3.2.0.orig/duckpy/__init__.py
+++ python-duckpy-3.2.0/duckpy/__init__.py
@@ -39,7 +39,8 @@ class Client(BaseClient):
             ua = None
         headers = {'User-Agent': ua} if ua else None
 
-        with httpx.Client(proxies=proxy, http2=True) as http:
+        transport = httpx.HTTPTransport(proxy=proxy) if proxy else None
+        with httpx.Client(transport=transport) as http:
             r = http.post(ddg_url, data=dict(q=query, **kwargs), headers=headers)
             data = r.read()
 
@@ -69,7 +70,7 @@ class AsyncClient(BaseClient):
             ua = None
         headers = {'User-Agent': ua} if ua else None
 
-        async with httpx.AsyncClient(proxies=proxy, http2=True) as http:
+        async with httpx.AsyncClient(proxy=proxy, http2=True) as http:
             r = await http.post(ddg_url, data=dict(q=query, **kwargs), headers=headers)
             data = r.read()
 
