Azure / Azure/azure-sdk-for-python
Storage Blob tsp conversion
- Dominant language
- Python
- Stars
- 5.6k
- Forks
- 3.4k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 193
Description
Improvements:
- With the tsp regeneration the operations have splatted out a lot of the previous param Models (BlobHttpHeaders, AppendPositionAccessConditions, BlobModifiedAccessConditions) a lot of the helper methods are not really necessary anymore and could be refactored and removed.
- A lot of the deserialization helper methods are no longer needed as the new typespec models are also dictionaries and can be called .as_dict()
Potential Issues:
- There was a transform that made AccessPolicy datetimes (start/expiry) into strings since python cannot handle that level of precision, however UserDelegationKey did not have that transform for signedStart and signedExpiry so it is generated as a datetime. We maintained this pattern in the typespec generated code, however this may need investigation as an incorrect datetime could cause issues with the service.
- def _upload_chunk(self, chunk_offset, chunk_data):
# TODO: This is incorrect, but works with recording.
- AccessPolicy takes in optional parameters but the underlying model is required properties, also permissions takes in ContainerSasPermissions but the type of permissions in the generated code is strA
- Download blob operation returns 304 as an error, Go and .NET customized this to return a success. Is returning a 304 ResourceNotModifiedError idiomatic to python
Contributor guide
Assessment
This issue has not been assessed yet.