@@ -241,9 +241,9 @@ def _separate_http_proxy_auth(self):
241241 proxy_without_auth = protocol + no_protocol [len (auth ) + 1 :]
242242 return proxy_without_auth , auth
243243
244- def _get_connection_manager (self , ** pool_manager_kwargs ):
244+ def _get_connection_manager (self ):
245245 pool_manager_init_args = {"timeout" : self .get_timeout ()}
246- pool_manager_init_args .update (pool_manager_kwargs .get ("init_args_for_pool_manager" , {}))
246+ pool_manager_init_args .update (self . _init_args_for_pool_manager .get ("init_args_for_pool_manager" , {}))
247247
248248 if self ._ignore_certificates :
249249 pool_manager_init_args ["cert_reqs" ] = "CERT_NONE"
@@ -270,10 +270,12 @@ def __init__(
270270 keep_alive : bool = False ,
271271 ignore_proxy : bool = False ,
272272 ignore_certificates : bool = False ,
273+ init_args_for_pool_manager : dict = None ,
273274 ):
274275 self .keep_alive = keep_alive
275276 self ._url = remote_server_addr
276277 self ._ignore_certificates = ignore_certificates
278+ self ._init_args_for_pool_manager = init_args_for_pool_manager or {}
277279
278280 # Env var NO_PROXY will override this part of the code
279281 _no_proxy = os .environ .get ("no_proxy" , os .environ .get ("NO_PROXY" ))
0 commit comments