The BlobClient class contains in many of its methods the capability to add a Customer Provided Key for encryption, by supplying a cpk argument that must contain a CustomerProvidedEncryptionKey object. Inside those methods, the CustomerProvidedEncryptionKey is converted into a CpkInfo object, as this seems to be the object that the lower-level method wants.
However apparently the CpkInfo class was modified a while ago, and one of its attributes, encryption_algorithm, was removed, while the code in BlobClient still tries to set it. An example (though it happens several times in the file) can be seen at :
|
cpk_info = CpkInfo(encryption_key=cpk.key_value, encryption_key_sha256=cpk.key_hash, |
|
encryption_algorithm=cpk.algorithm) |
This produces warnings
encryption_algorithm is not a known attribute of class <class 'azure.storage.blob._generated.models._models_py3.CpkInfo'> and will be ignored
.... i.e. it seems that the operation does go through, though the code seems to be a leftover
The
BlobClientclass contains in many of its methods the capability to add a Customer Provided Key for encryption, by supplying acpkargument that must contain aCustomerProvidedEncryptionKeyobject. Inside those methods, theCustomerProvidedEncryptionKeyis converted into aCpkInfoobject, as this seems to be the object that the lower-level method wants.However apparently the
CpkInfoclass was modified a while ago, and one of its attributes,encryption_algorithm, was removed, while the code inBlobClientstill tries to set it. An example (though it happens several times in the file) can be seen at :azure-sdk-for-python/sdk/storage/azure-storage-blob/azure/storage/blob/_blob_client.py
Lines 369 to 370 in e43995b
This produces warnings
.... i.e. it seems that the operation does go through, though the code seems to be a leftover