Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions sdk/cosmos/azure-cosmos/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
### 4.3.0b3 (Unreleased)

#### Features Added
- Added support for split-proof queries for the async client
- Added support for split-proof queries for the async client.

### Bugs fixed
- Default consistency level for the sync and async clients is no longer "Session" and will instead be set to the
consistency level of the user's cosmos account setting on initialization if not passed during client initialization.
consistency level of the user's cosmos account setting on initialization if not passed during client initialization.
This change will impact client application in terms of RUs and latency. Users relying on default `Session` consistency will need to pass it explicitly if their account consistency is different than `Session`.
Please see [Consistency Levels in Azure Cosmos DB](https://docs.microsoft.com/azure/cosmos-db/consistency-levels) for more details.
- Fixed invalid request body being sent when passing in `serverScript` body parameter to replace operations for trigger, sproc and udf resources.
- Moved `is_system_key` logic in async client.
- Fixed TypeErrors not being thrown when passing in invalid connection retry policies to the client.

### 4.3.0b2 (2022-01-25)
Expand All @@ -19,15 +20,15 @@ This version and all future versions will require Python 3.6+. Python 2.7 is no
We will also be removing support for Python 3.6 and will only support Python 3.7+ starting December 2022.

#### Features Added
- Added support for split-proof queries for the sync client
- Added support for split-proof queries for the sync client.

#### Other Changes
- Added async user agent for async client
- Added async user agent for async client.

### 4.3.0b1 (2021-12-14)

#### Features Added
- Added language native async i/o client
- Added language native async i/o client.

### 4.2.0 (2020-10-08)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

"""Iterable query results in the Azure Cosmos database service.
"""
import asyncio
from azure.core.async_paging import AsyncPageIterator
from azure.cosmos._execution_context.aio import execution_dispatcher

Expand Down Expand Up @@ -77,11 +78,6 @@ def __init__(
)
super(QueryIterable, self).__init__(self._fetch_next, self._unpack, continuation_token=continuation_token)

async def __aiter__(self):
if 'partition_key' in self._options:
self._options['partition_key'] = await self._options['partition_key']
return self

async def _unpack(self, block):
continuation = None
if self._client.last_response_headers:
Expand All @@ -100,6 +96,9 @@ async def _fetch_next(self, *args): # pylint: disable=unused-argument
:return: List of results.
:rtype: list
"""

if 'partitionKey' in self._options and asyncio.iscoroutine(self._options['partitionKey']):
self._options['partitionKey'] = await self._options['partitionKey']
block = await self._ex_context.fetch_next_block()
if not block:
raise StopAsyncIteration
Expand Down
4 changes: 1 addition & 3 deletions sdk/cosmos/azure-cosmos/azure/cosmos/aio/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,7 @@ async def create_container_if_not_exists(
analytical_storage_ttl = kwargs.pop("analytical_storage_ttl", None)
try:
container_proxy = self.get_container_client(id)
await container_proxy.read(
**kwargs
)
await container_proxy.read(**kwargs)
return container_proxy
except CosmosResourceNotFoundError:
return await self.create_container(
Expand Down