Fix/python sdk consistency - #160
Merged
Merged
Conversation
DatasetFilterForm, EventFilterForm and SubscriptionFilterForm all sent limit=100 when the caller left it unset, and the Python events.filter did the same through unwrap_or(100). timeseries.filter and every list() use the server's 1000, so the page size depended on which entity was asked about. All three now default to 1000. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: jgjesdal <jostein@intellistream.ai>
GET /files/search reads a limit parameter (default 100, clamped to 1000), but FileService::search never sent one, so a search could not return more than 100 hits. It now takes `limit: Option<u64>`, omitted when None; Python's files.search gains `limit=None` on both clients. BREAKING CHANGE: FileService::search (and the blocking mirror) takes a second argument; pass None for the previous behaviour. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: jgjesdal <jostein@intellistream.ai>
The sync and async insert_from_lists zipped timestamps with values, so extra entries on the longer side were dropped without a word. Both now build their collection through lists_to_collection, as the binary twin already did, which raises ValueError naming the two lengths. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: jgjesdal <jostein@intellistream.ai>
subscriptions.filter raised ValueError when handed both a form and keywords, where every other filter raises TypeError; it now raises TypeError too. The listener raised a bare Exception for every WebSocket failure, so `except DataHubException` never caught one. listen() and every listener method now raise DataHubException, with status_code and the problem attributes set to None since there is no HTTP response behind them. Using a listener after close() raises ValueError, as a closed Python file does. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: jgjesdal <jostein@intellistream.ai>
FileUpload::new panicked when the path was missing, a directory or had no file name, and get_body panicked when the file could not be opened. From Python that surfaced as PanicException, which derives from BaseException, so `except Exception` did not catch it. new and new_with_destination_path now return io::Result<FileUpload>, and get_body io::Result<Body>; upload_file reports an open failure as a 400 ResponseError. In Python the constructors raise FileNotFoundError, IsADirectoryError or another OSError through PyO3's io::Error mapping. BREAKING CHANGE: FileUpload::new, FileUpload::new_with_destination_path and FileUpload::get_body return io::Result. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: jgjesdal <jostein@intellistream.ai>
This reverts commit 6268fe5. files.search is left as it was. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: jgjesdal <jostein@intellistream.ai>
SubscriptionFilter carries id, externalId, name, timeseries, createdTime and lastUpdatedTime, and SubscriptionFilterForm takes the family shape: filter, limit: Option<u64>, and a flattened PageRequest for sort and cursor. In Python, filter() takes the criteria as keywords or filter= plus sort_by/sort_order/cursor and returns a Page, like datasets.filter. SubscriptionFilterForm and DataSort are removed. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: jgjesdal <jostein@intellistream.ai>
olavgg
approved these changes
Sep 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.