Azure / Azure/azure-sdk-for-python
delete_entity with TableEntity requires RowKey to be string
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 5.6k
- Fork
- 3.4k
- Merge medio
- 2g 2h
- PR unite (30g)
- 213
Descrizione
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? 😇
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Valutazione
Questa issue non è ancora stata valutata.