@@ -97,13 +97,8 @@ def await_completed(
9797 execution_id : str ,
9898 devbox_id : str ,
9999 * ,
100- config : PollingConfig | None = None ,
101- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
102- # The extra values given here take precedence over values defined on the client or passed to this method.
103- extra_headers : Headers | None = None ,
104- extra_query : Query | None = None ,
105- extra_body : Body | None = None ,
106- timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
100+ # Use polling_config to configure the "long" polling behavior.
101+ polling_config : PollingConfig | None = None ,
107102 ) -> DevboxAsyncExecutionDetailView :
108103 """Wait for an execution to complete.
109104
@@ -128,9 +123,6 @@ def wait_for_execution_status() -> DevboxAsyncExecutionDetailView:
128123 return self ._post (
129124 f"/v1/devboxes/{ devbox_id } /executions/{ execution_id } /wait_for_status" ,
130125 body = {"statuses" : ["completed" ]},
131- options = make_request_options (
132- extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
133- ),
134126 cast_to = DevboxAsyncExecutionDetailView ,
135127 )
136128
@@ -152,7 +144,7 @@ def handle_timeout_error(error: Exception) -> DevboxAsyncExecutionDetailView:
152144 def is_done (execution : DevboxAsyncExecutionDetailView ) -> bool :
153145 return execution .status == "completed"
154146
155- return poll_until (wait_for_execution_status , is_done , config , handle_timeout_error )
147+ return poll_until (wait_for_execution_status , is_done , polling_config , handle_timeout_error )
156148
157149 def execute_async (
158150 self ,
@@ -390,13 +382,8 @@ async def await_completed(
390382 execution_id : str ,
391383 * ,
392384 devbox_id : str ,
385+ # Use polling_config to configure the "long" polling behavior.
393386 polling_config : PollingConfig | None = None ,
394- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
395- # The extra values given here take precedence over values defined on the client or passed to this method.
396- extra_headers : Headers | None = None ,
397- extra_query : Query | None = None ,
398- extra_body : Body | None = None ,
399- timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
400387 ) -> DevboxAsyncExecutionDetailView :
401388 """Wait for an execution to complete.
402389
@@ -421,9 +408,6 @@ async def wait_for_execution_status() -> DevboxAsyncExecutionDetailView:
421408 return await self ._post (
422409 f"/v1/devboxes/{ devbox_id } /executions/{ execution_id } /wait_for_status" ,
423410 body = {"statuses" : ["completed" ]},
424- options = make_request_options (
425- extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
426- ),
427411 cast_to = DevboxAsyncExecutionDetailView ,
428412 )
429413 except APIStatusError as error :
0 commit comments