@@ -504,13 +504,11 @@ def init_transport(
504504 ssl_context = SSLConfig (
505505 verify = verify , cert = cert , trust_env = trust_env
506506 ).ssl_context
507- max_keepalive = pool_limits .soft_limit
508- max_connections = pool_limits .hard_limit
509507
510508 return httpcore .SyncConnectionPool (
511509 ssl_context = ssl_context ,
512- max_keepalive = max_keepalive ,
513- max_connections = max_connections ,
510+ max_keepalive = pool_limits . max_keepalive ,
511+ max_connections = pool_limits . max_connections ,
514512 )
515513
516514 def init_proxy_transport (
@@ -524,16 +522,14 @@ def init_proxy_transport(
524522 ssl_context = SSLConfig (
525523 verify = verify , cert = cert , trust_env = trust_env
526524 ).ssl_context
527- max_keepalive = pool_limits .soft_limit
528- max_connections = pool_limits .hard_limit
529525
530526 return httpcore .SyncHTTPProxy (
531527 proxy_url = proxy .url .raw ,
532528 proxy_headers = proxy .headers .raw ,
533529 proxy_mode = proxy .mode ,
534530 ssl_context = ssl_context ,
535- max_keepalive = max_keepalive ,
536- max_connections = max_connections ,
531+ max_keepalive = pool_limits . max_keepalive ,
532+ max_connections = pool_limits . max_connections ,
537533 )
538534
539535 def transport_for_url (self , url : URL ) -> httpcore .SyncHTTPTransport :
@@ -1050,13 +1046,11 @@ def init_transport(
10501046 ssl_context = SSLConfig (
10511047 verify = verify , cert = cert , trust_env = trust_env
10521048 ).ssl_context
1053- max_keepalive = pool_limits .soft_limit
1054- max_connections = pool_limits .hard_limit
10551049
10561050 return httpcore .AsyncConnectionPool (
10571051 ssl_context = ssl_context ,
1058- max_keepalive = max_keepalive ,
1059- max_connections = max_connections ,
1052+ max_keepalive = pool_limits . max_keepalive ,
1053+ max_connections = pool_limits . max_connections ,
10601054 http2 = http2 ,
10611055 )
10621056
@@ -1072,16 +1066,14 @@ def init_proxy_transport(
10721066 ssl_context = SSLConfig (
10731067 verify = verify , cert = cert , trust_env = trust_env
10741068 ).ssl_context
1075- max_keepalive = pool_limits .soft_limit
1076- max_connections = pool_limits .hard_limit
10771069
10781070 return httpcore .AsyncHTTPProxy (
10791071 proxy_url = proxy .url .raw ,
10801072 proxy_headers = proxy .headers .raw ,
10811073 proxy_mode = proxy .mode ,
10821074 ssl_context = ssl_context ,
1083- max_keepalive = max_keepalive ,
1084- max_connections = max_connections ,
1075+ max_keepalive = pool_limits . max_keepalive ,
1076+ max_connections = pool_limits . max_connections ,
10851077 http2 = http2 ,
10861078 )
10871079
0 commit comments