Skip to content

Commit 7ebe1fa

Browse files
aschollmeier-gcmlpmvantellingen
authored andcommitted
Update proxy argument in httpx Client/AsyncClient
Ref: https://github.com/encode/httpx/blob/master/CHANGELOG.md#0260-20th-december-2023
1 parent 41a5115 commit 7ebe1fa

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/zeep/transports.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,15 +183,17 @@ def __init__(
183183

184184
self._close_session = False
185185
self.cache = cache
186+
proxy_kwarg_name = "proxy" if httpx.__version__ >= "0.26.0" else "proxies"
187+
proxy_kwargs = {proxy_kwarg_name: proxy}
186188
self.wsdl_client = wsdl_client or httpx.Client(
187189
verify=verify_ssl,
188-
proxies=proxy,
189190
timeout=timeout,
191+
**proxy_kwargs,
190192
)
191193
self.client = client or httpx.AsyncClient(
192194
verify=verify_ssl,
193-
proxies=proxy,
194195
timeout=operation_timeout,
196+
**proxy_kwargs,
195197
)
196198
self.logger = logging.getLogger(__name__)
197199

0 commit comments

Comments
 (0)