2323"""
2424import warnings
2525from datetime import datetime
26- from typing import Any , Dict , List , Optional , Sequence , Union , Tuple , Mapping , Type , cast , overload
26+ from typing import Any , Dict , List , Optional , Sequence , Union , Tuple , Mapping , Type , cast , overload , Iterable
2727from typing_extensions import Literal
2828
2929from azure .core import MatchConditions
@@ -354,7 +354,7 @@ def query_items_change_feed(
354354 def query_items_change_feed (
355355 self ,
356356 * ,
357- feed_range : str ,
357+ feed_range : Dict [ str , Any ] ,
358358 max_item_count : Optional [int ] = None ,
359359 start_time : Optional [Union [datetime , Literal ["Now" , "Beginning" ]]] = None ,
360360 priority : Optional [Literal ["High" , "Low" ]] = None ,
@@ -363,7 +363,7 @@ def query_items_change_feed(
363363
364364 """Get a sorted list of items that were changed, in the order in which they were modified.
365365
366- :keyword str feed_range: The feed range that is used to define the scope.
366+ :keyword Dict[ str, Any] feed_range: The feed range that is used to define the scope.
367367 :keyword int max_item_count: Max number of items to be returned in the enumeration operation.
368368 :keyword start_time: The start time to start processing chang feed items.
369369 Beginning: Processing the change feed items from the beginning of the change feed.
@@ -440,7 +440,7 @@ def query_items_change_feed(
440440 """Get a sorted list of items that were changed, in the order in which they were modified.
441441
442442 :keyword str continuation: The continuation token retrieved from previous response.
443- :keyword str feed_range: The feed range that is used to define the scope.
443+ :keyword Dict[ str, Any] feed_range: The feed range that is used to define the scope.
444444 :keyword partition_key: The partition key that is used to define the scope
445445 (logical partition or a subset of a container)
446446 :type partition_key: Union[str, int, float, bool, List[Union[str, int, float, bool]]]
@@ -1365,14 +1365,18 @@ def read_feed_ranges(
13651365 self ,
13661366 * ,
13671367 force_refresh : Optional [bool ] = False ,
1368- ** kwargs : Any ) -> List [ str ]:
1368+ ** kwargs : Any ) -> Iterable [ Dict [ str , Any ] ]:
13691369
13701370 """ Obtains a list of feed ranges that can be used to parallelize feed operations.
13711371
13721372 :keyword bool force_refresh:
13731373 Flag to indicate whether obtain the list of feed ranges directly from cache or refresh the cache.
13741374 :returns: A list representing the feed ranges in base64 encoded string
1375- :rtype: List[str]
1375+ :rtype: Iterable[Dict[str, Any]]
1376+
1377+ .. note::
1378+ For each feed range, even through a Dict has been returned, but in the future, the structure may change.
1379+ Please just treat it as opaque and do not take any dependent on it.
13761380
13771381 """
13781382 if force_refresh is True :
@@ -1384,5 +1388,6 @@ def read_feed_ranges(
13841388 [Range ("" , "FF" , True , False )], # default to full range
13851389 ** kwargs )
13861390
1387- return [FeedRangeInternalEpk (Range .PartitionKeyRangeToRange (partitionKeyRange )).__str__ ()
1391+ feed_ranges = [FeedRangeInternalEpk (Range .PartitionKeyRangeToRange (partitionKeyRange )).to_dict ()
13881392 for partitionKeyRange in partition_key_ranges ]
1393+ return (feed_range for feed_range in feed_ranges )
0 commit comments