-
Notifications
You must be signed in to change notification settings - Fork 3.1k
[Cosmos] make PartitionKeyType public, mark excluded locations as sequence, make InternalException private #43235
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR makes the previously internal partition key type alias public and broadens excluded_locations parameter annotations from concrete lists to more general sequences, plus a small internal variable rename for clarity.
- Exposes PartitionKeyType (removes leading underscore) and updates all references.
- Updates excluded_locations annotations/docstrings from List[str] to Sequence[str].
- Renames a local variable in partition health tracking for clearer semantics.
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
partition_key.py | Makes PartitionKeyType public by removing underscore. |
container.py | Replaces usages of _PartitionKeyType with PartitionKeyType; widens excluded_locations type hints/docstrings to Sequence. |
aio/_cosmos_client_connection_async.py | Async equivalents updated to public PartitionKeyType and Sequence annotations. |
aio/_container.py | Async container updates similar to sync version. |
_read_items_helper.py | TYPE_CHECKING imports and annotations updated to PartitionKeyType. |
_query_builder.py | TYPE_CHECKING annotations updated to PartitionKeyType. |
_partition_health_tracker.py | Renames internal variable excluded_locations to unhealthy_locations for clarity. |
_cosmos_client_connection.py | Updates to PartitionKeyType; adjusts internal query plan method parameter typing. |
sdk/cosmos/azure-cosmos/azure/cosmos/_cosmos_client_connection.py
Outdated
Show resolved
Hide resolved
API Change CheckAPIView identified API level changes in this PR and created the following API reviews |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/azp run python - cosmos - ci |
Azure Pipelines successfully started running 1 pipeline(s). |
/check-enforcer override |
Tackling some of the bullet points from the api review for our next GA release: #43211
Items tackled here: