diff --git a/sdk/tables/azure-data-tables/CHANGELOG.md b/sdk/tables/azure-data-tables/CHANGELOG.md index 5b87998493ad..3638e63d0d9f 100644 --- a/sdk/tables/azure-data-tables/CHANGELOG.md +++ b/sdk/tables/azure-data-tables/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 12.0.0 (unreleased) +## 12.0.0 (2021-06-08) **Breaking** * EdmType.Binary data in entities will now be deserialized as `bytes` in Python 3 and `str` in Python 2, rather than an `EdmProperty` instance. Likewise on serialization, `bytes` in Python 3 and `str` in Python 2 will be interpreted as binary (this is unchanged for Python 3, but breaking for Python 2, where `str` was previously serialized as EdmType.String) * `TableClient.create_table` now returns an instance of `TableItem`. diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_base_client.py b/sdk/tables/azure-data-tables/azure/data/tables/_base_client.py index e76d0bd32372..dee6b80de13e 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/_base_client.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/_base_client.py @@ -4,7 +4,7 @@ # license information. # -------------------------------------------------------------------------- -from typing import Dict, Optional, Any, List, Mapping +from typing import Dict, Optional, Any, List, Mapping, Union from uuid import uuid4 try: from urllib.parse import parse_qs, quote, urlparse diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_models.py b/sdk/tables/azure-data-tables/azure/data/tables/_models.py index 9c21d9583648..a5835fea79ee 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/_models.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/_models.py @@ -377,10 +377,18 @@ def __init__(self, **kwargs): def __or__(self, other): # type: (TableSasPermissions) -> TableSasPermissions + """ + :param other: + :type other: :class:`~azure.data.tables.TableSasPermissions` + """ return TableSasPermissions(_str=str(self) + str(other)) def __add__(self, other): # type: (TableSasPermissions) -> TableSasPermissions + """ + :param other: + :type other: :class:`~azure.data.tables.TableSasPermissions` + """ return TableSasPermissions(_str=str(self) + str(other)) def __str__(self): 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 f7bb3696cbc6..8cecd4846783 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 @@ -369,7 +369,7 @@ def create_entity( """Insert entity in a table. :param entity: The properties for the table entity. - :type entity: Dict[str,str] or :class:`~azure.data.tables.TableEntity` + :type entity: Union[TableEntity, Mapping[str, Any]] :return: Dictionary mapping operation metadata returned from the service :rtype: Dict[str,str] :raises: :class:`~azure.core.exceptions.HttpResponseError` diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_table_shared_access_signature.py b/sdk/tables/azure-data-tables/azure/data/tables/_table_shared_access_signature.py index 3f93f56250df..eec1aac2110b 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/_table_shared_access_signature.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/_table_shared_access_signature.py @@ -95,10 +95,8 @@ def generate_table_sas(credential, table_name, **kwargs): Use the returned signature with the sas_token parameter of TableService. - :param account_key: Account key - :type account_key: str - :param account_name: Account name - :type account_name: str + :param credential: Credential used for creating Shared Access Signature + :type credential: :class:`~azure.core.credentials.AzureNamedKeyCredential` :param table_name: Table name :type table_name: str :keyword TableSasPermissions permission: diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_version.py b/sdk/tables/azure-data-tables/azure/data/tables/_version.py index 37b2923997a4..63dfa66aca46 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/_version.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/_version.py @@ -4,4 +4,4 @@ # license information. # -------------------------------------------------------------------------- -VERSION = "12.0.0b7" +VERSION = "12.0.0" 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 96ff42c7f069..84ffaea67f41 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 @@ -351,7 +351,7 @@ async def create_entity( """Insert entity in a table. :param entity: The properties for the table entity. - :type entity: :class:`~azure.data.tables.TableEntity` or Dict[str,str] + :type entity: Union[TableEntity, Mapping[str, Any]] :return: Dictionary mapping operation metadata returned from the service :rtype: Dict[str,str] :raises: :class:`~azure.core.exceptions.ResourceExistsError` If the entity already exists @@ -468,7 +468,7 @@ def list_entities(self, **kwargs) -> AsyncItemPaged[TableEntity]: :keyword select: Specify desired properties of an entity to return. :paramtype select: str or List[str] :return: AsyncItemPaged[:class:`~azure.data.tables.TableEntity`] - :rtype: ~azure.core.async_paging.AsyncItemPaged + :rtype: ~azure.core.async_paging.AsyncItemPaged[TableEntity] :raises: :class:`~azure.core.exceptions.HttpResponseError` .. admonition:: Example: @@ -509,7 +509,7 @@ def query_entities( :keyword parameters: Dictionary for formatting query with additional, user defined parameters :paramtype parameters: Dict[str, Any] :return: AsyncItemPaged[:class:`~azure.data.tables.TableEntity`] - :rtype: ~azure.core.async_paging.AsyncItemPaged + :rtype: ~azure.core.async_paging.AsyncItemPaged[TableEntity] :raises: :class:`~azure.core.exceptions.HttpResponseError` .. admonition:: Example: diff --git a/sdk/tables/azure-data-tables/setup.py b/sdk/tables/azure-data-tables/setup.py index 9c1043f5039a..634b9c277936 100644 --- a/sdk/tables/azure-data-tables/setup.py +++ b/sdk/tables/azure-data-tables/setup.py @@ -60,7 +60,7 @@ author_email='ascl@microsoft.com', url='https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/table/azure-table', classifiers=[ - "Development Status :: 4 - Beta", + "Development Status :: 5 - Production/Stable", 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7',