From 4631c6e9427650ffaaed2845709327c1f88ae81d Mon Sep 17 00:00:00 2001 From: Daniel Arvelini Date: Thu, 28 Nov 2024 22:20:27 -0300 Subject: [PATCH 1/2] HOTFIX: Keyword param "proxies" is missing. Update _client.py "proxies" param is missing if passed as keyword argument. Even tough it should be there, since it is mentioned in the docstring as an optional param. --- httpx/_client.py | 1 + 1 file changed, 1 insertion(+) diff --git a/httpx/_client.py b/httpx/_client.py index 018d440c17..972d50529c 100644 --- a/httpx/_client.py +++ b/httpx/_client.py @@ -651,6 +651,7 @@ def __init__( http1: bool = True, http2: bool = False, proxy: ProxyTypes | None = None, + proxies: dict[str, ProxyTypes] | None = None, mounts: None | (typing.Mapping[str, BaseTransport | None]) = None, timeout: TimeoutTypes = DEFAULT_TIMEOUT_CONFIG, follow_redirects: bool = False, From 3bf53fafce78da819086f5c193228ef6d7f1589f Mon Sep 17 00:00:00 2001 From: Daniel Arvelini Date: Fri, 29 Nov 2024 08:07:42 -0300 Subject: [PATCH 2/2] Updating deprecated docstring Client() class Update _client.py Updating deprecated docstring Client() class. Keyword param "proxies" is no longer used, but it was still "possible" by the docstring of the class. That docstring is now updated to avoid developers on passing deprecated params. --- httpx/_client.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/httpx/_client.py b/httpx/_client.py index 972d50529c..2249231f8c 100644 --- a/httpx/_client.py +++ b/httpx/_client.py @@ -620,8 +620,6 @@ class Client(BaseClient): * **http2** - *(optional)* A boolean indicating if HTTP/2 support should be enabled. Defaults to `False`. * **proxy** - *(optional)* A proxy URL where all the traffic should be routed. - * **proxies** - *(optional)* A dictionary mapping proxy keys to proxy - URLs. * **timeout** - *(optional)* The timeout configuration to use when sending requests. * **limits** - *(optional)* The limits configuration to use. @@ -651,7 +649,6 @@ def __init__( http1: bool = True, http2: bool = False, proxy: ProxyTypes | None = None, - proxies: dict[str, ProxyTypes] | None = None, mounts: None | (typing.Mapping[str, BaseTransport | None]) = None, timeout: TimeoutTypes = DEFAULT_TIMEOUT_CONFIG, follow_redirects: bool = False,