Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed **provisional** from computed_properties #39543

1 change: 1 addition & 0 deletions sdk/cosmos/azure-cosmos/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@

#### Other Changes
* This release requires aiohttp version 3.10.11 and above. See [PR 39396](https://github.com/Azure/azure-sdk-for-python/pull/39396)
* Un-marked `computed_properties` keyword as **provisional**. See [PR 39543](https://github.com/Azure/azure-sdk-for-python/pull/39543)
andrewmathew1 marked this conversation as resolved.
Show resolved Hide resolved

### 4.9.1b1 (2024-12-13)

Expand Down
6 changes: 4 additions & 2 deletions sdk/cosmos/azure-cosmos/azure/cosmos/aio/_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ async def create_container(
initial_headers: Optional[Dict[str, str]] = None,
etag: Optional[str] = None,
match_condition: Optional[MatchConditions] = None,
computed_properties: Optional[List[Dict[str, str]]] = None,
analytical_storage_ttl: Optional[int] = None,
vector_embedding_policy: Optional[Dict[str, Any]] = None,
change_feed_policy: Optional[Dict[str, Any]] = None,
Expand All @@ -199,7 +200,7 @@ async def create_container(
has changed, and act according to the condition specified by the `match_condition` parameter.
:keyword match_condition: The match condition to use upon the etag.
:paramtype match_condition: ~azure.core.MatchConditions
:keyword List[Dict[str, str]] computed_properties: **provisional** Sets The computed properties for this
:keyword List[Dict[str, str]] computed_properties: Sets The computed properties for this
andrewmathew1 marked this conversation as resolved.
Show resolved Hide resolved
container in the Azure Cosmos DB Service. For more Information on how to use computed properties visit
`here: https://learn.microsoft.com/azure/cosmos-db/nosql/query/computed-properties?tabs=dotnet`
:keyword response_hook: A callable invoked with the response metadata.
Expand Down Expand Up @@ -296,6 +297,7 @@ async def create_container_if_not_exists(
initial_headers: Optional[Dict[str, str]] = None,
etag: Optional[str] = None,
match_condition: Optional[MatchConditions] = None,
computed_properties: Optional[List[Dict[str, str]]] = None,
analytical_storage_ttl: Optional[int] = None,
vector_embedding_policy: Optional[Dict[str, Any]] = None,
change_feed_policy: Optional[Dict[str, Any]] = None,
Expand Down Expand Up @@ -324,7 +326,7 @@ async def create_container_if_not_exists(
has changed, and act according to the condition specified by the `match_condition` parameter.
:keyword match_condition: The match condition to use upon the etag.
:paramtype match_condition: ~azure.core.MatchConditions
:keyword List[Dict[str, str]] computed_properties: **provisional** Sets The computed properties for this
:keyword List[Dict[str, str]] computed_properties: Sets The computed properties for this
container in the Azure Cosmos DB Service. For more Information on how to use computed properties visit
`here: https://learn.microsoft.com/azure/cosmos-db/nosql/query/computed-properties?tabs=dotnet`
:keyword response_hook: A callable invoked with the response metadata.
Expand Down
6 changes: 4 additions & 2 deletions sdk/cosmos/azure-cosmos/azure/cosmos/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ def create_container( # pylint:disable=docstring-missing-param
etag: Optional[str] = None,
match_condition: Optional[MatchConditions] = None,
analytical_storage_ttl: Optional[int] = None,
computed_properties: Optional[List[Dict[str, str]]] = None,
vector_embedding_policy: Optional[Dict[str, Any]] = None,
change_feed_policy: Optional[Dict[str, Any]] = None,
full_text_policy: Optional[Dict[str, Any]] = None,
Expand All @@ -200,7 +201,7 @@ def create_container( # pylint:disable=docstring-missing-param
:keyword int analytical_storage_ttl: Analytical store time to live (TTL) for items in the container. A value of
None leaves analytical storage off and a value of -1 turns analytical storage on with no TTL. Please
note that analytical storage can only be enabled on Synapse Link enabled accounts.
:keyword List[Dict[str, str]] computed_properties: **provisional** Sets The computed properties for this
:keyword List[Dict[str, str]] computed_properties: Sets The computed properties for this
container in the Azure Cosmos DB Service. For more Information on how to use computed properties visit
`here: https://learn.microsoft.com/azure/cosmos-db/nosql/query/computed-properties?tabs=dotnet`
:keyword Dict[str, Any] vector_embedding_policy: **provisional** The vector embedding policy for the container.
Expand Down Expand Up @@ -298,6 +299,7 @@ def create_container_if_not_exists( # pylint:disable=docstring-missing-param
etag: Optional[str] = None,
match_condition: Optional[MatchConditions] = None,
analytical_storage_ttl: Optional[int] = None,
computed_properties: Optional[List[Dict[str, str]]] = None,
vector_embedding_policy: Optional[Dict[str, Any]] = None,
change_feed_policy: Optional[Dict[str, Any]] = None,
full_text_policy: Optional[Dict[str, Any]] = None,
Expand Down Expand Up @@ -326,7 +328,7 @@ def create_container_if_not_exists( # pylint:disable=docstring-missing-param
:keyword int analytical_storage_ttl: Analytical store time to live (TTL) for items in the container. A value of
None leaves analytical storage off and a value of -1 turns analytical storage on with no TTL. Please
note that analytical storage can only be enabled on Synapse Link enabled accounts.
:keyword List[Dict[str, str]] computed_properties: **provisional** Sets The computed properties for this
:keyword List[Dict[str, str]] computed_properties: Sets The computed properties for this
container in the Azure Cosmos DB Service. For more Information on how to use computed properties visit
`here: https://learn.microsoft.com/azure/cosmos-db/nosql/query/computed-properties?tabs=dotnet`
:keyword Dict[str, Any] vector_embedding_policy: The vector embedding policy for the container. Each vector
Expand Down
1 change: 0 additions & 1 deletion sdk/cosmos/azure-cosmos/test/test_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,6 @@ def test_continuation_token_size_limit_query(self):
self.assertLessEqual(len(token.encode('utf-8')), 1024)

@pytest.mark.cosmosQuery
@pytest.mark.skip
def test_computed_properties_query(self):
computed_properties = [{'name': "cp_lower", 'query': "SELECT VALUE LOWER(c.db_group) FROM c"},
{'name': "cp_power",
Expand Down
1 change: 0 additions & 1 deletion sdk/cosmos/azure-cosmos/test/test_query_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,6 @@ async def test_continuation_token_size_limit_query_async(self):
assert len(token.encode('utf-8')) <= 1024

@pytest.mark.cosmosQuery
@pytest.mark.skip
async def test_computed_properties_query(self):
computed_properties = [{'name': "cp_lower", 'query': "SELECT VALUE LOWER(c.db_group) FROM c"},
{'name': "cp_power",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import unittest
import uuid
import pytest

import azure.cosmos.cosmos_client as cosmos_client
import test_config
Expand Down Expand Up @@ -33,6 +34,7 @@ def setUpClass(cls):
cls.client = cosmos_client.CosmosClient(cls.host, cls.masterKey)
cls.created_db = cls.client.get_database_client(cls.TEST_DATABASE_ID)

@pytest.mark.cosmosQuery
def test_computed_properties_query(self):
computed_properties = [{'name': "cp_lower", 'query': "SELECT VALUE LOWER(c.db_group) FROM c"},
{'name': "cp_power",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import unittest
import uuid
import pytest

import test_config
from azure.cosmos.aio import CosmosClient, DatabaseProxy, ContainerProxy
Expand Down Expand Up @@ -38,6 +39,7 @@ async def asyncSetUp(self):
async def asyncTearDown(self):
await self.client.close()

@pytest.mark.cosmosQuery
andrewmathew1 marked this conversation as resolved.
Show resolved Hide resolved
async def test_computed_properties_query_async(self):
computed_properties = [{'name': "cp_lower", 'query': "SELECT VALUE LOWER(c.db_group) FROM c"},
{'name': "cp_power",
Expand Down
Loading