From 6786a5f34a813486b796fc77985e20592d6afe6a Mon Sep 17 00:00:00 2001 From: seankane-msft Date: Fri, 28 Aug 2020 14:23:30 -0700 Subject: [PATCH 1/2] fixing version issue by not overwriting the version with the semantic version --- .../azure-data-tables/azure/data/tables/_table_client.py | 3 +-- .../azure/data/tables/_table_service_client.py | 3 +-- .../azure/data/tables/aio/_table_client_async.py | 1 - .../azure/data/tables/aio/_table_service_client_async.py | 1 - 4 files changed, 2 insertions(+), 6 deletions(-) diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_table_client.py b/sdk/tables/azure-data-tables/azure/data/tables/_table_client.py index a2776d7510c9..2d1417ad6e16 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/_table_client.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/_table_client.py @@ -59,8 +59,7 @@ def __init__( """ super(TableClient, self).__init__(account_url, table_name, credential=credential, **kwargs) self._client = AzureTable(self.url, pipeline=self._pipeline) - self._client._config.version = kwargs.get('api_version', VERSION) # pylint: disable=protected-access - + @classmethod def from_connection_string( cls, conn_str, # type: str diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_table_service_client.py b/sdk/tables/azure-data-tables/azure/data/tables/_table_service_client.py index 28186410fe16..45b12a58ac5b 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/_table_service_client.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/_table_service_client.py @@ -47,8 +47,7 @@ def __init__( super(TableServiceClient, self).__init__(account_url, service='table', credential=credential, **kwargs) self._client = AzureTable(self.url, pipeline=self._pipeline) - self._client._config.version = kwargs.get('api_version', VERSION) # pylint: disable=protected-access - + @classmethod def from_connection_string( cls, conn_str, # type: str diff --git a/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_client_async.py b/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_client_async.py index 8902b0652bf8..6826e15ec685 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_client_async.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_client_async.py @@ -71,7 +71,6 @@ def __init__( account_url, table_name=table_name, credential=credential, loop=loop, **kwargs ) self._client = AzureTable(self.url, pipeline=self._pipeline, loop=loop) - self._client._config.version = kwargs.get('api_version', VERSION) # pylint: disable = W0212 self._loop = loop @classmethod diff --git a/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_service_client_async.py b/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_service_client_async.py index 50c8c1570f0c..ba041344ae69 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_service_client_async.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_service_client_async.py @@ -84,7 +84,6 @@ def __init__( loop=loop, **kwargs) self._client = AzureTable(url=self.url, pipeline=self._pipeline, loop=loop) # type: ignore - self._client._config.version = kwargs.get('api_version', VERSION) # pylint: disable=protected-access self._loop = loop @classmethod From e791d2464ab6fda47a10c0543233f72cb31e27ca Mon Sep 17 00:00:00 2001 From: seankane-msft Date: Mon, 31 Aug 2020 09:39:20 -0700 Subject: [PATCH 2/2] removed VERSION imports --- .../azure-data-tables/azure/data/tables/_table_client.py | 3 +-- .../azure/data/tables/_table_service_client.py | 3 +-- .../azure/data/tables/aio/_table_client_async.py | 1 - .../azure/data/tables/aio/_table_service_client_async.py | 2 +- 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_table_client.py b/sdk/tables/azure-data-tables/azure/data/tables/_table_client.py index 2d1417ad6e16..47d2cdfac340 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/_table_client.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/_table_client.py @@ -27,7 +27,6 @@ from ._serialize import serialize_iso from ._deserialize import _return_headers_and_deserialized from ._error import _process_table_error -from ._version import VERSION from ._models import TableEntityPropertiesPaged, UpdateMode, TableItem @@ -59,7 +58,7 @@ def __init__( """ super(TableClient, self).__init__(account_url, table_name, credential=credential, **kwargs) self._client = AzureTable(self.url, pipeline=self._pipeline) - + @classmethod def from_connection_string( cls, conn_str, # type: str diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_table_service_client.py b/sdk/tables/azure-data-tables/azure/data/tables/_table_service_client.py index 45b12a58ac5b..3262bef182b0 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/_table_service_client.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/_table_service_client.py @@ -18,7 +18,6 @@ from ._base_client import parse_connection_str, TransportWrapper from ._models import LocationMode from ._error import _process_table_error -from ._version import VERSION from ._table_client import TableClient from ._table_service_client_base import TableServiceClientBase @@ -47,7 +46,7 @@ def __init__( super(TableServiceClient, self).__init__(account_url, service='table', credential=credential, **kwargs) self._client = AzureTable(self.url, pipeline=self._pipeline) - + @classmethod def from_connection_string( cls, conn_str, # type: str diff --git a/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_client_async.py b/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_client_async.py index 6826e15ec685..d3ea9ba1b9b3 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_client_async.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_client_async.py @@ -20,7 +20,6 @@ from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async -from .. import VERSION from .._base_client import parse_connection_str from .._entity import TableEntity from .._generated.aio import AzureTable diff --git a/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_service_client_async.py b/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_service_client_async.py index ba041344ae69..1e1d6bc8f62c 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_service_client_async.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_service_client_async.py @@ -16,7 +16,7 @@ from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async -from .. import VERSION, LocationMode +from .. import LocationMode from .._base_client import parse_connection_str from .._generated.aio._azure_table_async import AzureTable from .._generated.models import TableServiceProperties, TableProperties, QueryOptions