File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -116,15 +116,15 @@ def __init__( # noqa: PLR0913
116116 server : str ,
117117 base_url : str ,
118118 api_key : str ,
119- timeout : int ,
119+ timeout_seconds : int ,
120120 retries : int ,
121121 retry_policy : RetryPolicy ,
122122 cache : HTTPCache | None = None ,
123123 ) -> None :
124124 self .server = server
125125 self .base_url = base_url
126126 self .api_key = api_key
127- self .timeout = timeout
127+ self .timeout_seconds = timeout_seconds
128128 self .retries = retries
129129 self .retry_policy = retry_policy
130130 self .cache = cache
@@ -343,7 +343,7 @@ def request(
343343 headers = request_kwargs .pop ("headers" , {}).copy ()
344344 headers .update (self .headers )
345345
346- timeout = request_kwargs .pop ("timeout" , self .timeout )
346+ timeout = request_kwargs .pop ("timeout" , self .timeout_seconds )
347347 files = request_kwargs .pop ("files" , None )
348348
349349 if use_cache and not reset_cache and self .cache is not None :
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ def build(cls, config: Config) -> APIBackendBuilder:
3333 server = primary_api_config .server ,
3434 base_url = primary_api_config .base_url ,
3535 api_key = primary_api_config .api_key ,
36- timeout = config .connection .timeout ,
36+ timeout_seconds = config .connection .timeout_seconds ,
3737 retries = config .connection .retries ,
3838 retry_policy = config .connection .retry_policy ,
3939 cache = http_cache ,
@@ -51,7 +51,7 @@ def build(cls, config: Config) -> APIBackendBuilder:
5151 server = fallback_api_config .server ,
5252 base_url = fallback_api_config .base_url ,
5353 api_key = fallback_api_config .api_key ,
54- timeout = config .connection .timeout ,
54+ timeout_seconds = config .connection .timeout_seconds ,
5555 retries = config .connection .retries ,
5656 retry_policy = config .connection .retry_policy ,
5757 cache = http_cache ,
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ class APIConfig:
1818class ConnectionConfig :
1919 retries : int
2020 retry_policy : RetryPolicy
21- timeout : int
21+ timeout_seconds : int
2222
2323
2424@dataclass
@@ -51,7 +51,7 @@ class Config:
5151 default_factory = lambda : ConnectionConfig (
5252 retries = 5 ,
5353 retry_policy = RetryPolicy .HUMAN ,
54- timeout = 10 ,
54+ timeout_seconds = 10 ,
5555 )
5656 )
5757
Original file line number Diff line number Diff line change @@ -286,7 +286,7 @@ class TestAPIBase(unittest.TestCase):
286286 server : str
287287 base_url : str
288288 api_key : str
289- timeout : int
289+ timeout_seconds : int
290290 retries : int
291291 retry_policy : RetryPolicy
292292 dir : str
@@ -298,7 +298,7 @@ def setUp(self) -> None:
298298 self .server = "https://test.openml.org/"
299299 self .base_url = "api/v1/xml"
300300 self .api_key = "normaluser"
301- self .timeout = 10
301+ self .timeout_seconds = 10
302302 self .retries = 3
303303 self .retry_policy = RetryPolicy .HUMAN
304304 self .dir = "test_cache"
@@ -312,7 +312,7 @@ def setUp(self) -> None:
312312 server = self .server ,
313313 base_url = self .base_url ,
314314 api_key = self .api_key ,
315- timeout = self .timeout ,
315+ timeout_seconds = self .timeout_seconds ,
316316 retries = self .retries ,
317317 retry_policy = self .retry_policy ,
318318 cache = self .cache ,
@@ -340,7 +340,7 @@ def _get_http_client( # noqa: PLR0913
340340 server : str ,
341341 base_url : str ,
342342 api_key : str ,
343- timeout : int ,
343+ timeout_seconds : int ,
344344 retries : int ,
345345 retry_policy : RetryPolicy ,
346346 cache : HTTPCache | None = None ,
@@ -349,7 +349,7 @@ def _get_http_client( # noqa: PLR0913
349349 server = server ,
350350 base_url = base_url ,
351351 api_key = api_key ,
352- timeout = timeout ,
352+ timeout_seconds = timeout_seconds ,
353353 retries = retries ,
354354 retry_policy = retry_policy ,
355355 cache = cache ,
You can’t perform that action at this time.
0 commit comments