@@ -792,6 +792,7 @@ def __init__(
792
792
custom_query : Mapping [str , object ] | None = None ,
793
793
_strict_response_validation : bool ,
794
794
) -> None :
795
+ kwargs : dict [str , Any ] = {}
795
796
if limits is not None :
796
797
warnings .warn (
797
798
"The `connection_pool_limits` argument is deprecated. The `http_client` argument should be passed instead" ,
@@ -804,6 +805,7 @@ def __init__(
804
805
limits = DEFAULT_CONNECTION_LIMITS
805
806
806
807
if transport is not None :
808
+ kwargs ["transport" ] = transport
807
809
warnings .warn (
808
810
"The `transport` argument is deprecated. The `http_client` argument should be passed instead" ,
809
811
category = DeprecationWarning ,
@@ -813,6 +815,7 @@ def __init__(
813
815
raise ValueError ("The `http_client` argument is mutually exclusive with `transport`" )
814
816
815
817
if proxies is not None :
818
+ kwargs ["proxies" ] = proxies
816
819
warnings .warn (
817
820
"The `proxies` argument is deprecated. The `http_client` argument should be passed instead" ,
818
821
category = DeprecationWarning ,
@@ -856,10 +859,9 @@ def __init__(
856
859
base_url = base_url ,
857
860
# cast to a valid type because mypy doesn't understand our type narrowing
858
861
timeout = cast (Timeout , timeout ),
859
- proxies = proxies ,
860
- transport = transport ,
861
862
limits = limits ,
862
863
follow_redirects = True ,
864
+ ** kwargs , # type: ignore
863
865
)
864
866
865
867
def is_closed (self ) -> bool :
@@ -1358,6 +1360,7 @@ def __init__(
1358
1360
custom_headers : Mapping [str , str ] | None = None ,
1359
1361
custom_query : Mapping [str , object ] | None = None ,
1360
1362
) -> None :
1363
+ kwargs : dict [str , Any ] = {}
1361
1364
if limits is not None :
1362
1365
warnings .warn (
1363
1366
"The `connection_pool_limits` argument is deprecated. The `http_client` argument should be passed instead" ,
@@ -1370,6 +1373,7 @@ def __init__(
1370
1373
limits = DEFAULT_CONNECTION_LIMITS
1371
1374
1372
1375
if transport is not None :
1376
+ kwargs ["transport" ] = transport
1373
1377
warnings .warn (
1374
1378
"The `transport` argument is deprecated. The `http_client` argument should be passed instead" ,
1375
1379
category = DeprecationWarning ,
@@ -1379,6 +1383,7 @@ def __init__(
1379
1383
raise ValueError ("The `http_client` argument is mutually exclusive with `transport`" )
1380
1384
1381
1385
if proxies is not None :
1386
+ kwargs ["proxies" ] = proxies
1382
1387
warnings .warn (
1383
1388
"The `proxies` argument is deprecated. The `http_client` argument should be passed instead" ,
1384
1389
category = DeprecationWarning ,
@@ -1422,10 +1427,9 @@ def __init__(
1422
1427
base_url = base_url ,
1423
1428
# cast to a valid type because mypy doesn't understand our type narrowing
1424
1429
timeout = cast (Timeout , timeout ),
1425
- proxies = proxies ,
1426
- transport = transport ,
1427
1430
limits = limits ,
1428
1431
follow_redirects = True ,
1432
+ ** kwargs , # type: ignore
1429
1433
)
1430
1434
1431
1435
def is_closed (self ) -> bool :
0 commit comments