From 0e586b0d05f86182f9700532516e7fa4e6a2bace Mon Sep 17 00:00:00 2001 From: xiafu Date: Tue, 8 Sep 2020 16:11:56 -0700 Subject: [PATCH] fix pylint and update changelog --- sdk/storage/azure-storage-blob-changefeed/CHANGELOG.md | 5 +++++ .../azure/storage/blob/changefeed/_models.py | 8 ++++---- .../azure/storage/blob/changefeed/_version.py | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/sdk/storage/azure-storage-blob-changefeed/CHANGELOG.md b/sdk/storage/azure-storage-blob-changefeed/CHANGELOG.md index 67842c1c0e08..7f6c5a70014d 100644 --- a/sdk/storage/azure-storage-blob-changefeed/CHANGELOG.md +++ b/sdk/storage/azure-storage-blob-changefeed/CHANGELOG.md @@ -1,3 +1,8 @@ +## 12.0.0b2 (2020-9-9) +**Breaking changes** +- Change the `continuation_token` from a dict to a str. +- `start_time`/`end_time` and `continuation_token` are mutually exclusive now. + ## 12.0.0b1 (2020-07-07) - Initial Release. Please see the README for information on the new design. - Support for ChangeFeedClient: get change feed events by page, get all change feed events, get events in a time range diff --git a/sdk/storage/azure-storage-blob-changefeed/azure/storage/blob/changefeed/_models.py b/sdk/storage/azure-storage-blob-changefeed/azure/storage/blob/changefeed/_models.py index b59c0d85a973..be91804e9c0a 100644 --- a/sdk/storage/azure-storage-blob-changefeed/azure/storage/blob/changefeed/_models.py +++ b/sdk/storage/azure-storage-blob-changefeed/azure/storage/blob/changefeed/_models.py @@ -58,17 +58,17 @@ def __init__( extract_data=self._extract_data_cb, continuation_token=continuation_token or "" ) - continuation_token = json.loads(continuation_token) if continuation_token else None + dict_continuation_token = json.loads(continuation_token) if continuation_token else None # type: dict - if continuation_token and (container_client.primary_hostname != continuation_token["UrlHost"]): + if dict_continuation_token and (container_client.primary_hostname != dict_continuation_token["UrlHost"]): # pylint: disable=unsubscriptable-object raise ValueError("The token is not for the current storage account.") - if continuation_token and (continuation_token["CursorVersion"] != 1): + if dict_continuation_token and (dict_continuation_token["CursorVersion"] != 1): # pylint: disable=unsubscriptable-object raise ValueError("The CursorVersion is not supported by the current SDK.") self.results_per_page = results_per_page or 5000 self.current_page = None self._change_feed = ChangeFeed(container_client, self.results_per_page, start_time=start_time, end_time=end_time, - cf_cursor=continuation_token) + cf_cursor=dict_continuation_token) def _get_next_cf(self, continuation_token): # pylint:disable=unused-argument try: diff --git a/sdk/storage/azure-storage-blob-changefeed/azure/storage/blob/changefeed/_version.py b/sdk/storage/azure-storage-blob-changefeed/azure/storage/blob/changefeed/_version.py index 62cb7bc47ca2..9ed9f5528271 100644 --- a/sdk/storage/azure-storage-blob-changefeed/azure/storage/blob/changefeed/_version.py +++ b/sdk/storage/azure-storage-blob-changefeed/azure/storage/blob/changefeed/_version.py @@ -4,4 +4,4 @@ # license information. # -------------------------------------------------------------------------- -VERSION = "12.0.0b1" +VERSION = "12.0.0b2"