@@ -843,6 +843,8 @@ def __init__(self, **kwargs: Any) -> None:
843843 arg : kwargs [arg ] for arg in ("verify" , "cert" , "trust_env" , "http1" , "http2" , "limits" ) if arg in kwargs
844844 }
845845
846+ transport_kwargs ["socket_options" ] = socket_options
847+
846848 proxy_mounts = {
847849 key : None if proxy is None else HTTPTransport (proxy = proxy , ** transport_kwargs )
848850 for key , proxy in proxy_map .items ()
@@ -854,7 +856,7 @@ def __init__(self, **kwargs: Any) -> None:
854856 kwargs ["mounts" ] = proxy_mounts
855857
856858 # Sets the default transport so that HTTPX won't automatically configure proxies.
857- kwargs ["transport" ] = kwargs . get ( "transport" , default_transport )
859+ kwargs ["transport" ] = default_transport
858860
859861 super ().__init__ (** kwargs )
860862
@@ -1404,6 +1406,8 @@ def __init__(self, **kwargs: Any) -> None:
14041406 arg : kwargs [arg ] for arg in ("verify" , "cert" , "trust_env" , "http1" , "http2" , "limits" ) if arg in kwargs
14051407 }
14061408
1409+ transport_kwargs ["socket_options" ] = socket_options
1410+
14071411 proxy_mounts = {
14081412 key : None if proxy is None else AsyncHTTPTransport (proxy = proxy , ** transport_kwargs )
14091413 for key , proxy in proxy_map .items ()
@@ -1415,7 +1419,7 @@ def __init__(self, **kwargs: Any) -> None:
14151419 kwargs ["mounts" ] = proxy_mounts
14161420
14171421 # Sets the default transport so that HTTPX won't automatically configure proxies.
1418- kwargs ["transport" ] = kwargs . get ( "transport" , default_transport )
1422+ kwargs ["transport" ] = default_transport
14191423
14201424 super ().__init__ (** kwargs )
14211425
0 commit comments