diff --git a/README.rst b/README.rst index f400594..be8a490 100644 --- a/README.rst +++ b/README.rst @@ -17,6 +17,10 @@ Handles multi-API versions of Azure Storage Data Plane originally from https://g Change Log ---------- +0.5.1 ++++++ +* Fix import issue for filedatalake + 0.5.0 +++++ * Add new api support for azure-multiapi-storagev2: diff --git a/azure/multiapi/storagev2/filedatalake/v2020_02_10/_data_lake_lease.py b/azure/multiapi/storagev2/filedatalake/v2020_02_10/_data_lake_lease.py index 3643601..7ac9a99 100644 --- a/azure/multiapi/storagev2/filedatalake/v2020_02_10/_data_lake_lease.py +++ b/azure/multiapi/storagev2/filedatalake/v2020_02_10/_data_lake_lease.py @@ -10,7 +10,7 @@ Union, Optional, Any, TypeVar, TYPE_CHECKING ) -from azure.multiapi.storagev2.blob.v2019_07_07 import BlobLeaseClient +from azure.multiapi.storagev2.blob.v2020_02_10 import BlobLeaseClient if TYPE_CHECKING: diff --git a/azure/multiapi/storagev2/filedatalake/v2020_02_10/_data_lake_service_client.py b/azure/multiapi/storagev2/filedatalake/v2020_02_10/_data_lake_service_client.py index d2bccd6..fef869e 100644 --- a/azure/multiapi/storagev2/filedatalake/v2020_02_10/_data_lake_service_client.py +++ b/azure/multiapi/storagev2/filedatalake/v2020_02_10/_data_lake_service_client.py @@ -11,7 +11,7 @@ from azure.core.paging import ItemPaged -from azure.multiapi.storagev2.blob.v2019_07_07 import BlobServiceClient +from azure.multiapi.storagev2.blob.v2020_02_10 import BlobServiceClient from ._shared.base_client import StorageAccountHostsMixin, parse_query, parse_connection_str from ._file_system_client import FileSystemClient from ._data_lake_directory_client import DataLakeDirectoryClient diff --git a/azure/multiapi/storagev2/filedatalake/v2020_02_10/_file_system_client.py b/azure/multiapi/storagev2/filedatalake/v2020_02_10/_file_system_client.py index ce6167f..a8c76bc 100644 --- a/azure/multiapi/storagev2/filedatalake/v2020_02_10/_file_system_client.py +++ b/azure/multiapi/storagev2/filedatalake/v2020_02_10/_file_system_client.py @@ -13,7 +13,7 @@ import six from azure.core.paging import ItemPaged -from azure.multiapi.storagev2.blob.v2019_07_07 import ContainerClient +from azure.multiapi.storagev2.blob.v2020_02_10 import ContainerClient from ._shared.base_client import StorageAccountHostsMixin, parse_query, parse_connection_str from ._serialize import convert_dfs_url_to_blob_url from ._models import LocationMode, FileSystemProperties, PublicAccess diff --git a/azure/multiapi/storagev2/filedatalake/v2020_02_10/_models.py b/azure/multiapi/storagev2/filedatalake/v2020_02_10/_models.py index 0a87afb..38cfee2 100644 --- a/azure/multiapi/storagev2/filedatalake/v2020_02_10/_models.py +++ b/azure/multiapi/storagev2/filedatalake/v2020_02_10/_models.py @@ -7,16 +7,16 @@ # pylint: disable=super-init-not-called, too-many-lines from enum import Enum -from azure.multiapi.storagev2.blob.v2019_07_07 import LeaseProperties as BlobLeaseProperties -from azure.multiapi.storagev2.blob.v2019_07_07 import AccountSasPermissions as BlobAccountSasPermissions -from azure.multiapi.storagev2.blob.v2019_07_07 import ResourceTypes as BlobResourceTypes -from azure.multiapi.storagev2.blob.v2019_07_07 import UserDelegationKey as BlobUserDelegationKey -from azure.multiapi.storagev2.blob.v2019_07_07 import ContentSettings as BlobContentSettings -from azure.multiapi.storagev2.blob.v2019_07_07 import AccessPolicy as BlobAccessPolicy -from azure.multiapi.storagev2.blob.v2019_07_07 import DelimitedTextDialect as BlobDelimitedTextDialect -from azure.multiapi.storagev2.blob.v2019_07_07 import DelimitedJsonDialect as BlobDelimitedJSON -from azure.multiapi.storagev2.blob.v2019_07_07 import ArrowDialect as BlobArrowDialect -from azure.multiapi.storagev2.blob.v2019_07_07._models import ContainerPropertiesPaged +from azure.multiapi.storagev2.blob.v2020_02_10 import LeaseProperties as BlobLeaseProperties +from azure.multiapi.storagev2.blob.v2020_02_10 import AccountSasPermissions as BlobAccountSasPermissions +from azure.multiapi.storagev2.blob.v2020_02_10 import ResourceTypes as BlobResourceTypes +from azure.multiapi.storagev2.blob.v2020_02_10 import UserDelegationKey as BlobUserDelegationKey +from azure.multiapi.storagev2.blob.v2020_02_10 import ContentSettings as BlobContentSettings +from azure.multiapi.storagev2.blob.v2020_02_10 import AccessPolicy as BlobAccessPolicy +from azure.multiapi.storagev2.blob.v2020_02_10 import DelimitedTextDialect as BlobDelimitedTextDialect +from azure.multiapi.storagev2.blob.v2020_02_10 import DelimitedJsonDialect as BlobDelimitedJSON +from azure.multiapi.storagev2.blob.v2020_02_10 import ArrowDialect as BlobArrowDialect +from azure.multiapi.storagev2.blob.v2020_02_10._models import ContainerPropertiesPaged from ._shared.models import DictMixin diff --git a/azure/multiapi/storagev2/filedatalake/v2020_02_10/_path_client.py b/azure/multiapi/storagev2/filedatalake/v2020_02_10/_path_client.py index 9562e60..0068e49 100644 --- a/azure/multiapi/storagev2/filedatalake/v2020_02_10/_path_client.py +++ b/azure/multiapi/storagev2/filedatalake/v2020_02_10/_path_client.py @@ -13,7 +13,7 @@ import six from azure.core.exceptions import AzureError -from azure.multiapi.storagev2.blob.v2019_07_07 import BlobClient +from azure.multiapi.storagev2.blob.v2020_02_10 import BlobClient from ._data_lake_lease import DataLakeLeaseClient from ._deserialize import process_storage_error from ._generated import DataLakeStorageClient diff --git a/azure/multiapi/storagev2/filedatalake/v2020_02_10/_serialize.py b/azure/multiapi/storagev2/filedatalake/v2020_02_10/_serialize.py index 34a7437..0287150 100644 --- a/azure/multiapi/storagev2/filedatalake/v2020_02_10/_serialize.py +++ b/azure/multiapi/storagev2/filedatalake/v2020_02_10/_serialize.py @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- -from azure.multiapi.storagev2.blob.v2019_07_07._serialize import _get_match_headers # pylint: disable=protected-access +from azure.multiapi.storagev2.blob.v2020_02_10._serialize import _get_match_headers # pylint: disable=protected-access from ._shared import encode_base64 from ._generated.models import ModifiedAccessConditions, PathHTTPHeaders, \ SourceModifiedAccessConditions, LeaseAccessConditions diff --git a/azure/multiapi/storagev2/filedatalake/v2020_02_10/_shared_access_signature.py b/azure/multiapi/storagev2/filedatalake/v2020_02_10/_shared_access_signature.py index b442bac..0808155 100644 --- a/azure/multiapi/storagev2/filedatalake/v2020_02_10/_shared_access_signature.py +++ b/azure/multiapi/storagev2/filedatalake/v2020_02_10/_shared_access_signature.py @@ -5,8 +5,8 @@ # -------------------------------------------------------------------------- from typing import TYPE_CHECKING -from azure.multiapi.storagev2.blob.v2019_07_07 import generate_account_sas as generate_blob_account_sas -from azure.multiapi.storagev2.blob.v2019_07_07 import generate_container_sas, generate_blob_sas +from azure.multiapi.storagev2.blob.v2020_02_10 import generate_account_sas as generate_blob_account_sas +from azure.multiapi.storagev2.blob.v2020_02_10 import generate_container_sas, generate_blob_sas if TYPE_CHECKING: import datetime from ._models import AccountSasPermissions, FileSystemSasPermissions, FileSasPermissions, ResourceTypes, \ diff --git a/azure/multiapi/storagev2/filedatalake/v2020_02_10/aio/_data_lake_lease_async.py b/azure/multiapi/storagev2/filedatalake/v2020_02_10/aio/_data_lake_lease_async.py index 836e45b..53e3255 100644 --- a/azure/multiapi/storagev2/filedatalake/v2020_02_10/aio/_data_lake_lease_async.py +++ b/azure/multiapi/storagev2/filedatalake/v2020_02_10/aio/_data_lake_lease_async.py @@ -9,7 +9,7 @@ Union, Optional, Any, TypeVar, TYPE_CHECKING ) -from azure.multiapi.storagev2.blob.v2019_07_07.aio import BlobLeaseClient +from azure.multiapi.storagev2.blob.v2020_02_10.aio import BlobLeaseClient from .._data_lake_lease import DataLakeLeaseClient as DataLakeLeaseClientBase diff --git a/azure/multiapi/storagev2/filedatalake/v2020_02_10/aio/_data_lake_service_client_async.py b/azure/multiapi/storagev2/filedatalake/v2020_02_10/aio/_data_lake_service_client_async.py index 9c9df14..b40fe80 100644 --- a/azure/multiapi/storagev2/filedatalake/v2020_02_10/aio/_data_lake_service_client_async.py +++ b/azure/multiapi/storagev2/filedatalake/v2020_02_10/aio/_data_lake_service_client_async.py @@ -7,7 +7,7 @@ from azure.core.paging import ItemPaged -from azure.multiapi.storagev2.blob.v2019_07_07.aio import BlobServiceClient +from azure.multiapi.storagev2.blob.v2020_02_10.aio import BlobServiceClient from .._generated.aio import DataLakeStorageClient from .._shared.base_client_async import AsyncStorageAccountHostsMixin from ._file_system_client_async import FileSystemClient diff --git a/azure/multiapi/storagev2/filedatalake/v2020_02_10/aio/_file_system_client_async.py b/azure/multiapi/storagev2/filedatalake/v2020_02_10/aio/_file_system_client_async.py index 15409d5..0fea4e3 100644 --- a/azure/multiapi/storagev2/filedatalake/v2020_02_10/aio/_file_system_client_async.py +++ b/azure/multiapi/storagev2/filedatalake/v2020_02_10/aio/_file_system_client_async.py @@ -16,7 +16,7 @@ from azure.core.async_paging import AsyncItemPaged from azure.core.tracing.decorator_async import distributed_trace_async -from azure.multiapi.storagev2.blob.v2019_07_07.aio import ContainerClient +from azure.multiapi.storagev2.blob.v2020_02_10.aio import ContainerClient from ._data_lake_file_client_async import DataLakeFileClient from ._data_lake_directory_client_async import DataLakeDirectoryClient diff --git a/azure/multiapi/storagev2/filedatalake/v2020_02_10/aio/_models.py b/azure/multiapi/storagev2/filedatalake/v2020_02_10/aio/_models.py index ba143f6..6ecdf74 100644 --- a/azure/multiapi/storagev2/filedatalake/v2020_02_10/aio/_models.py +++ b/azure/multiapi/storagev2/filedatalake/v2020_02_10/aio/_models.py @@ -6,7 +6,7 @@ # pylint: disable=too-few-public-methods, too-many-instance-attributes # pylint: disable=super-init-not-called, too-many-lines from azure.core.async_paging import AsyncPageIterator -from azure.multiapi.storagev2.blob.v2019_07_07.aio._models import ContainerPropertiesPaged +from azure.multiapi.storagev2.blob.v2020_02_10.aio._models import ContainerPropertiesPaged from .._deserialize import return_headers_and_deserialized_path_list, process_storage_error from .._generated.models import StorageErrorException, Path diff --git a/azure/multiapi/storagev2/filedatalake/v2020_02_10/aio/_path_client_async.py b/azure/multiapi/storagev2/filedatalake/v2020_02_10/aio/_path_client_async.py index 509c0fd..874113b 100644 --- a/azure/multiapi/storagev2/filedatalake/v2020_02_10/aio/_path_client_async.py +++ b/azure/multiapi/storagev2/filedatalake/v2020_02_10/aio/_path_client_async.py @@ -5,7 +5,7 @@ # -------------------------------------------------------------------------- # pylint: disable=invalid-overridden-method from azure.core.exceptions import AzureError -from azure.multiapi.storagev2.blob.v2019_07_07.aio import BlobClient +from azure.multiapi.storagev2.blob.v2020_02_10.aio import BlobClient from .._shared.base_client_async import AsyncStorageAccountHostsMixin from .._path_client import PathClient as PathClientBase from .._models import DirectoryProperties, AccessControlChangeResult, AccessControlChangeFailure, \ diff --git a/scripts/updatev2_1.sh b/scripts/updatev2_1.sh index 105ac74..a1b0ea8 100755 --- a/scripts/updatev2_1.sh +++ b/scripts/updatev2_1.sh @@ -8,7 +8,7 @@ cd $workdir if [ ! -d venv ]; then python -m virtualenv venv . venv/bin/activate - pip install azure-storage-file-datalake azure-storage-blob azure-storage-file-share azure-storage-queue -U + pip install azure-storage-file-datalake==12.2.0b1 azure-storage-blob==12.6.0b1 azure-storage-file-share azure-storage-queue -U fi @@ -34,9 +34,13 @@ for service in blob fileshare filedatalake queue; do if [ "$service" = "filedatalake" ]; then echo "filedatalake" - - sed -i "s/from azure.storage.blob import/from azure.multiapi.storagev2.blob.v2019_07_07 import/g" $f - sed -i "s/from azure.storage.blob./from azure.multiapi.storagev2.blob.v2019_07_07./g" $f + default="2019_07_07" + if [[ "$ver" > "$default" ]]; then + default=$ver + fi + + sed -i "s/from azure.storage.blob import/from azure.multiapi.storagev2.blob.v$default import/g" $f + sed -i "s/from azure.storage.blob./from azure.multiapi.storagev2.blob.v$default./g" $f fi namespace=azure.storage.$service diff --git a/setup.py b/setup.py index b99f01a..72d2241 100644 --- a/setup.py +++ b/setup.py @@ -35,7 +35,7 @@ setup( name='azure-multiapi-storage', - version='0.5.0', + version='0.5.1', description='Microsoft Azure Storage Client Library for Python with multi API version support.', long_description=open('README.rst', 'r').read(), license='MIT',