Azure / Azure/azure-sdk-for-python

[Tables] Better support for Entity de/serialization

Aperta
#26,318 2 commenti 0 reazioni 1 assegnatario Assegnata a @annatisch Vedi su GitHub
auto-close-exempt Client feature-request Tables
Lingua principale
Python
Stelle
5.6k
Fork
3.4k
Merge medio
2g 2h
PR unite (30g)
202

Descrizione

This is an umbrella issue to resolve issues in serialization and deserialization.

We have some customer issues about serialization:
- [ ] https://github.com/Azure/azure-sdk-for-python/issues/26360
- [ ] https://github.com/Azure/azure-sdk-for-python/issues/24499
- [ ] https://github.com/Azure/azure-sdk-for-python/issues/35554

Besides that, we should:
- [ ] https://github.com/Azure/azure-sdk-for-python/issues/23997
- [x] And align serialization sequence difference between sync and async clients in `update_entity` and `upsert_entity`( from comment: https://github.com/Azure/azure-sdk-for-python/pull/31862#discussion_r1347841711)

We also have a customer issue about deserialization:
- [ ] https://github.com/Azure/azure-sdk-for-python/issues/25403

After these sub issues are resolved, we should:
- [ ] Clean up serialize.py and deserialize.py.

Here are some thoughts about current Entity implementations:
- Comparing with other languages, Python doesn't have a concrete definition of Entity. This will cause a potential problem that the same entity can be used in Python but not in other languages. We should make Entity compatible with other languages after.
- The current way that we define `EntityProperty` is not easy to understand. https://github.com/Azure/azure-sdk-for-python/blob/57165b2f9644222f62ef48ef6b49166646a41058/sdk/tables/azure-data-tables/azure/data/tables/_entity.py#L58
For example, there's a customer issue complaining about better support for int64 in serialization layer.

Some resources:
- https://gist.github.com/annatisch/600f9040aee9b0f60c030d1b9e6b73f0
- Probably can get some ideas from `azure-core`

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.