Skip to content

feat: add optional timeout parameter to API request methods#79

Merged
TordAreStromsnes merged 3 commits intomainfrom
feat/optional-timeout-setting
Mar 3, 2026
Merged

feat: add optional timeout parameter to API request methods#79
TordAreStromsnes merged 3 commits intomainfrom
feat/optional-timeout-setting

Conversation

@TordAreStromsnes
Copy link
Contributor

Timeout support added to API methods:

  • All core request methods (_request, _request_binary, _request_binary_stream) and their interfaces now accept an optional timeout parameter, which can be a float or a (connect, read) tuple.
  • The _make_request_with_retry internal method now supports the timeout parameter, ensuring actual HTTP requests respect the specified timeout.

Bulk data and streaming enhancements:

  • get_bulk_data and get_bulk_data_stream in _bulk_data.py now accept and pass through the timeout parameter, enabling timeout control for large/binary data downloads.

Pagination and query improvements:

  • Pagination helpers (_fetch_next_page, _yield_nextlink_pages) in _pagination.py now accept and propagate the timeout parameter, ensuring paginated requests are also covered.
  • The main query execution method (execute_query) now supports a timeout parameter for full end-to-end timeout control on queries.

Type hinting and imports:

  • All affected modules now import Union and update type hints to reflect the new timeout parameter signatures.

Documentation updates:

  • All updated methods include expanded docstrings to explain the new timeout parameter and its usage.

These changes collectively provide fine-grained control over network request timeouts, improving reliability and user experience for all DSIS client API operations.

@TordAreStromsnes TordAreStromsnes merged commit c80f1b9 into main Mar 3, 2026
9 checks passed
@TordAreStromsnes TordAreStromsnes deleted the feat/optional-timeout-setting branch March 3, 2026 12:00
TordAreStromsnes pushed a commit that referenced this pull request Mar 3, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.5.0](v1.4.0...v1.5.0)
(2026-03-03)


### Features

* add optional timeout parameter to API request methods
([#79](#79))
([c80f1b9](c80f1b9))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants