Skip to content

Commit

Permalink
[Tables] Client and pipeline refactor (#18045)
Browse files Browse the repository at this point in the history
* Removed unused encryption

* Started refactor

* More refactoring of clients

* Updated async retry policy

* Some test and sample fixes

* pylint

* Fixed acl tests

* Skip retry for now

* Fix pipeline sharing

* Fixed retry tests

* Pylint

* Update sdk/tables/azure-data-tables/tests/test_retry.py

Co-authored-by: Sean Kane <68240067+seankane-msft@users.noreply.github.com>

* Update sdk/tables/azure-data-tables/tests/test_retry_async.py

Co-authored-by: Sean Kane <68240067+seankane-msft@users.noreply.github.com>

* Updated changelog

* Fix CI

Co-authored-by: Sean Kane <68240067+seankane-msft@users.noreply.github.com>
  • Loading branch information
annatisch and seankane-msft authored Apr 16, 2021
1 parent a5607a7 commit 6be6d47
Show file tree
Hide file tree
Showing 51 changed files with 1,224 additions and 2,237 deletions.
11 changes: 10 additions & 1 deletion sdk/tables/azure-data-tables/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
# Release History

## 12.0.0b7 (Unreleased)
* Fixed issue with Cosmos merge operations
**Breaking**
* Removed explicit `LinearRetry` and `ExponentialRetry` in favor of keyword parameter.
* Renamed `filter` parameter in query APIs to `query_filter`.
* The `location_mode` attribute on clients is now read-only. This has been added as a keyword parameter to the constructor.

**Fixes**
* Fixed issue with Cosmos merge operations.
* Removed legacy Storage policies from pipeline.
* Removed unused legacy client-side encryption attributes from client classes.
* Fixed sharing of pipeline between service/table clients.

## 12.0.0b6 (2021-04-06)
* Updated deserialization of datetime fields in entities to support preservation of the service format with additional decimal place.
Expand Down
2 changes: 1 addition & 1 deletion sdk/tables/azure-data-tables/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ Querying entities in the table:
from azure.data.tables import TableClient
my_filter = "PartitionKey eq 'RedMarker'"
table_client = TableClient.from_connection_string(conn_str="<connection_string>", table_name="mytable")
entities = table_client.query_entities(filter=my_filter)
entities = table_client.query_entities(my_filter)
for entity in entities:
for key in entity.keys():
print("Key: {}, Value: {}".format(key, entity[key]))
Expand Down
3 changes: 0 additions & 3 deletions sdk/tables/azure-data-tables/azure/data/tables/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
BatchTransactionResult,
BatchErrorException,
)
from ._policies import ExponentialRetry, LinearRetry
from ._version import VERSION
from ._deserialize import TableErrorCode
from ._table_batch import TableBatchOperations
Expand All @@ -35,8 +34,6 @@
__all__ = [
"TableClient",
"TableServiceClient",
"ExponentialRetry",
"LinearRetry",
"LocationMode",
"ResourceTypes",
"AccountSasPermissions",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
except ImportError:
pass

from ._constants import DEV_ACCOUNT_NAME, DEV_ACCOUNT_SECONDARY_NAME

from ._common_conversion import (
_sign_string,
)
Expand Down Expand Up @@ -87,13 +85,6 @@ def _get_canonicalized_resource(self, request):
return "/" + self.account_name + str(uri_path)
except TypeError:
pass

# for emulator, use the DEV_ACCOUNT_NAME instead of DEV_ACCOUNT_SECONDARY_NAME
# as this is how the emulator works
if self.is_emulated and uri_path.find(DEV_ACCOUNT_SECONDARY_NAME) == 1:
# only replace the first instance
uri_path = uri_path.replace(DEV_ACCOUNT_SECONDARY_NAME, DEV_ACCOUNT_NAME, 1)

return "/" + self.account_name + uri_path

def _get_canonicalized_headers(self, request):
Expand Down
Loading

0 comments on commit 6be6d47

Please sign in to comment.