@@ -794,6 +794,7 @@ def __init__(
794
794
custom_query : Mapping [str , object ] | None = None ,
795
795
_strict_response_validation : bool ,
796
796
) -> None :
797
+ kwargs : dict [str , Any ] = {}
797
798
if limits is not None :
798
799
warnings .warn (
799
800
"The `connection_pool_limits` argument is deprecated. The `http_client` argument should be passed instead" ,
@@ -806,6 +807,7 @@ def __init__(
806
807
limits = DEFAULT_CONNECTION_LIMITS
807
808
808
809
if transport is not None :
810
+ kwargs ["transport" ] = transport
809
811
warnings .warn (
810
812
"The `transport` argument is deprecated. The `http_client` argument should be passed instead" ,
811
813
category = DeprecationWarning ,
@@ -815,6 +817,7 @@ def __init__(
815
817
raise ValueError ("The `http_client` argument is mutually exclusive with `transport`" )
816
818
817
819
if proxies is not None :
820
+ kwargs ["proxies" ] = proxies
818
821
warnings .warn (
819
822
"The `proxies` argument is deprecated. The `http_client` argument should be passed instead" ,
820
823
category = DeprecationWarning ,
@@ -858,10 +861,9 @@ def __init__(
858
861
base_url = base_url ,
859
862
# cast to a valid type because mypy doesn't understand our type narrowing
860
863
timeout = cast (Timeout , timeout ),
861
- proxies = proxies ,
862
- transport = transport ,
863
864
limits = limits ,
864
865
follow_redirects = True ,
866
+ ** kwargs , # type: ignore
865
867
)
866
868
867
869
def is_closed (self ) -> bool :
@@ -1375,6 +1377,7 @@ def __init__(
1375
1377
custom_headers : Mapping [str , str ] | None = None ,
1376
1378
custom_query : Mapping [str , object ] | None = None ,
1377
1379
) -> None :
1380
+ kwargs : dict [str , Any ] = {}
1378
1381
if limits is not None :
1379
1382
warnings .warn (
1380
1383
"The `connection_pool_limits` argument is deprecated. The `http_client` argument should be passed instead" ,
@@ -1387,6 +1390,7 @@ def __init__(
1387
1390
limits = DEFAULT_CONNECTION_LIMITS
1388
1391
1389
1392
if transport is not None :
1393
+ kwargs ["transport" ] = transport
1390
1394
warnings .warn (
1391
1395
"The `transport` argument is deprecated. The `http_client` argument should be passed instead" ,
1392
1396
category = DeprecationWarning ,
@@ -1396,6 +1400,7 @@ def __init__(
1396
1400
raise ValueError ("The `http_client` argument is mutually exclusive with `transport`" )
1397
1401
1398
1402
if proxies is not None :
1403
+ kwargs ["proxies" ] = proxies
1399
1404
warnings .warn (
1400
1405
"The `proxies` argument is deprecated. The `http_client` argument should be passed instead" ,
1401
1406
category = DeprecationWarning ,
@@ -1439,10 +1444,9 @@ def __init__(
1439
1444
base_url = base_url ,
1440
1445
# cast to a valid type because mypy doesn't understand our type narrowing
1441
1446
timeout = cast (Timeout , timeout ),
1442
- proxies = proxies ,
1443
- transport = transport ,
1444
1447
limits = limits ,
1445
1448
follow_redirects = True ,
1449
+ ** kwargs , # type: ignore
1446
1450
)
1447
1451
1448
1452
def is_closed (self ) -> bool :
0 commit comments