Azure / Azure/azure-sdk-for-python

Wrong type for unique_key_policy in CosmosDB async DatabaseProxy.create_container

オープン
#41,593 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
Client Cosmos customer-reported needs-team-attention question Service Attention
主要言語
Python
スター
5.6k
フォーク
3.4k
平均マージ
2日 2時間
マージ済み PR(30日)
213

説明

- **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.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Compare the async DatabaseProxy.create_container annotation for unique_key_policy with the sync counterpart mentioned in the issue. Confirm the async signature accepts Dict[str, Any] | None, then run the relevant azure-cosmos tests or type checks to verify the corrected annotation.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
azure, python
領域
backend, databases
issue の種類
バグ
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
55/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。