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