scottwernervt / cloudstorage

Unified cloud storage API for storage services.
http://cloudstorage.readthedocs.io/en/latest/
MIT License
93 stars 27 forks source link

Update for azure-storage-blob==2.1.0 #70

Closed c-stephenson closed 3 years ago

c-stephenson commented 3 years ago

Hi, From Azure SDK v12.x BlockBlobService seems to be deprecated on more recent versions of azure-storage-blob in favour of BlobServiceClient

Error:

ImportError: cannot import name 'BlockBlobService' from 'azure.storage.blob' (/databricks/python/lib/python3.7/site-packages/azure/storage/blob/__init__.py)
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<command-337957> in <module>
----> 1 from cloudstorage.drivers.microsoft import AzureStorageDriver

/databricks/python/lib/python3.7/site-packages/cloudstorage/drivers/microsoft.py in <module>
     17 from azure.common import AzureConflictHttpError
     18 from azure.storage.blob import PublicAccess
---> 19 from azure.storage.blob import BlockBlobService
     20 from azure.storage.blob.models import Blob as AzureBlob
     21 from azure.storage.blob.models import Container as AzureContainer

ImportError: cannot import name 'BlockBlobService' from 'azure.storage.blob' (/databricks/python/lib/python3.7/site-packages/azure/storage/blob/__init__.py)

Environment:

azure-storage-blob=12.6.0
cloudstorage=0.10.1

I've been ok to use the 2.x SDK up until now but I'm now having dependency issues in my environment using MLFlow which uses 12.x

Are you planning on bringing this up to date at any point?

Requesting hopefully :)

Chris

c-stephenson commented 3 years ago

Accidental duplication of issue #71