Azure / Azure/azure-sdk-for-python

Wrong type for unique_key_policy in CosmosDB async DatabaseProxy.create_container

Open
#41,593 1 comment 0 reactions 0 assignees View on GitHub
Client Cosmos customer-reported needs-team-attention question Service Attention
Dominant language
Python
Stars
5.6k
Forks
3.4k
Avg merge
1d 21h
Merged PRs (30d)
193

Description

- **Package Name**: azure-cosmos
- **Package Version**: 4.9.0
- **Operating System**: mcr.microsoft.com/devcontainers/python:1-3.13 through WSL
- **Python Version**: 3.13

**Describe the bug**
For the `DatabaseProxy.create_container` method, `unique_key_policy` should be typed as `Dict[str, Any] | None` as in the sync counterpart.

It's now `Dict[str, str] | None` for async.

**To Reproduce**
Steps to reproduce the behavior:
1. Install the package

**Expected behavior**
unique_key_policy should be typed as `Dict[str, Any] | None` as in the sync counterpart.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Additional context**
Add any other context about the problem here.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.