3232from azure .core .tracing .decorator_async import distributed_trace_async # type: ignore
3333
3434from ._cosmos_client_connection_async import CosmosClientConnection
35+ from .._change_feed .feed_range_internal import FeedRangeInternalEpk
3536from .._cosmos_responses import CosmosDict , CosmosList
3637from ._scripts import ScriptsProxy
3738from .._base import (
4243 GenerateGuidId ,
4344 _set_properties_cache
4445)
45- from .._feed_range import FeedRange , FeedRangeEpk
4646from .._routing .routing_range import Range
4747from ..offer import ThroughputProperties
4848from ..partition_key import (
@@ -534,16 +534,15 @@ def query_items_change_feed(
534534 def query_items_change_feed (
535535 self ,
536536 * ,
537- feed_range : FeedRange ,
537+ feed_range : str ,
538538 max_item_count : Optional [int ] = None ,
539539 start_time : Optional [Union [datetime , Literal ["Now" , "Beginning" ]]] = None ,
540540 priority : Optional [Literal ["High" , "Low" ]] = None ,
541541 ** kwargs : Any
542542 ) -> AsyncItemPaged [Dict [str , Any ]]:
543543 """Get a sorted list of items that were changed, in the order in which they were modified.
544544
545- :keyword feed_range: The feed range that is used to define the scope.
546- :type feed_range: ~azure.cosmos.FeedRange
545+ :keyword str feed_range: The feed range that is used to define the scope.
547546 :keyword int max_item_count: Max number of items to be returned in the enumeration operation.
548547 :keyword start_time: The start time to start processing chang feed items.
549548 Beginning: Processing the change feed items from the beginning of the change feed.
@@ -621,8 +620,7 @@ def query_items_change_feed( # pylint: disable=unused-argument
621620 """Get a sorted list of items that were changed, in the order in which they were modified.
622621
623622 :keyword str continuation: The continuation token retrieved from previous response.
624- :keyword feed_range: The feed range that is used to define the scope.
625- :type feed_range: ~azure.cosmos.FeedRange
623+ :keyword str feed_range: The feed range that is used to define the scope.
626624 :keyword partition_key: The partition key that is used to define the scope
627625 (logical partition or a subset of a container)
628626 :type partition_key: Union[str, int, float, bool, List[Union[str, int, float, bool]]]
@@ -692,8 +690,7 @@ def query_items_change_feed( # pylint: disable=unused-argument
692690 self ._get_epk_range_for_partition_key (kwargs .pop ('partition_key' ))
693691
694692 if kwargs .get ("feed_range" ) is not None :
695- feed_range : FeedRangeEpk = kwargs .pop ('feed_range' )
696- change_feed_state_context ["feedRange" ] = feed_range ._feed_range_internal
693+ change_feed_state_context ["feedRange" ] = kwargs .pop ('feed_range' )
697694
698695 feed_options ["containerProperties" ] = self ._get_properties ()
699696 feed_options ["changeFeedStateContext" ] = change_feed_state_context
@@ -1299,7 +1296,7 @@ async def read_feed_ranges(
12991296 * ,
13001297 force_refresh : Optional [bool ] = False ,
13011298 ** kwargs : Any
1302- ) -> List [FeedRange ]:
1299+ ) -> List [str ]:
13031300 """ Obtains a list of feed ranges that can be used to parallelize feed operations.
13041301
13051302 :keyword bool force_refresh:
@@ -1318,5 +1315,5 @@ async def read_feed_ranges(
13181315 [Range ("" , "FF" , True , False )],
13191316 ** kwargs )
13201317
1321- return [FeedRangeEpk (Range .PartitionKeyRangeToRange (partitionKeyRange ))
1318+ return [FeedRangeInternalEpk (Range .PartitionKeyRangeToRange (partitionKeyRange )). __str__ ( )
13221319 for partitionKeyRange in partition_key_ranges ]
0 commit comments