Azure / Azure/azure-sdk-for-python
delete_entity with TableEntity requires RowKey to be string
- Dominant language
- Python
- Stars
- 5.6k
- Forks
- 3.4k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 193
Description
When using `create_entity` or `upsert_entity` and passing a `TableEntity` the SDK takes care of converting the property data types. For example, the `RowKey` could have type `UUID`. See [_add_entity_properties](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/tables/azure-data-tables/azure/data/tables/_serialize.py#L189).
`delete_entity` also offers an overload accepting a `TableEntity` - [but then uses `PartitionKey` and `RowKey` directly](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/tables/azure-data-tables/azure/data/tables/_table_client.py#L336), raising a `TypeError: PartitionKey or RowKey must be of type string.` when I use my same object that I pass to `create/upsert`.
Is this expected behaviour? I can cast to string, but wouldn't it be more consistent if this would be handled by the SDK? 😇
Contributor guide
Assessment
This issue has not been assessed yet.