Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Storage] HttpResponse changes (new generated code) #36546

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
f30d9a1
Initial gen, Blobs-only changes, no retry in async yet
vincenttran-msft Jul 19, 2024
fdb7d26
Matching _shared
vincenttran-msft Jul 19, 2024
543d93b
Decouple is_retry in policies_async, test in blob then propagate to o…
vincenttran-msft Jul 22, 2024
87fe7fb
Fix file_share one-off async body loading
vincenttran-msft Jul 22, 2024
b7765d4
Merge branch 'main' into vincenttran/response_changes_postgen
vincenttran-msft Jul 22, 2024
f2ea4c1
Fileshare's policies_async
vincenttran-msft Jul 23, 2024
6228d1d
Lint + retry, next step is consistent _shared
vincenttran-msft Jul 23, 2024
513f1f2
Fix wrong translation mapping
vincenttran-msft Jul 24, 2024
f8bedfa
Make _download_async match sync, passing locally
vincenttran-msft Jul 24, 2024
33c9f5f
Re-record since tests seem to be hitting new readall logic and some e…
vincenttran-msft Jul 24, 2024
ddee7c3
Merge branch 'main' into vincenttran/response_changes_postgen
vincenttran-msft Jul 24, 2024
4ac2cc4
Async encryption v1
vincenttran-msft Jul 24, 2024
215bf2d
Merge branch 'vincenttran/response_changes_postgen' of https://github…
vincenttran-msft Jul 24, 2024
c0ebfec
Propagate policies_async to datalake & queue
vincenttran-msft Jul 25, 2024
34ed49b
Whitespace
vincenttran-msft Jul 25, 2024
55e0a88
Nit again
vincenttran-msft Jul 25, 2024
f9703e5
Mypy now wants a piece
vincenttran-msft Jul 25, 2024
1f6afe0
Adjust test case to match our new retry logic
vincenttran-msft Jul 26, 2024
8c5f481
Merge branch 'main' into vincenttran/response_changes_postgen
vincenttran-msft Aug 12, 2024
47c95e9
Regen, no pinning
vincenttran-msft Aug 12, 2024
85f8790
Blob refactor
vincenttran-msft Aug 16, 2024
f5b0dd0
Refactor pt2
vincenttran-msft Aug 16, 2024
3afb657
Refactor nit
vincenttran-msft Aug 16, 2024
f5d523e
Full refactor
vincenttran-msft Aug 16, 2024
50ecd15
Fix bad C+P in refactor
vincenttran-msft Aug 16, 2024
e0c7465
Pylint
vincenttran-msft Aug 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sdk/storage/azure-storage-blob/assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "python",
"TagPrefix": "python/storage/azure-storage-blob",
"Tag": "python/storage/azure-storage-blob_adfb24f3d6"
"Tag": "python/storage/azure-storage-blob_fad0e99de3"
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

from copy import deepcopy
from typing import Any
from typing_extensions import Self

from azure.core import PipelineClient
from azure.core.pipeline import policies
Expand Down Expand Up @@ -110,7 +111,7 @@ def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
def close(self) -> None:
self._client.close()

def __enter__(self) -> "AzureBlobStorage":
def __enter__(self) -> Self:
self._client.__enter__()
return self

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ def _json_attemp(data):
# context otherwise.
_LOGGER.critical("Wasn't XML not JSON, failing")
raise DeserializationError("XML is invalid") from err
elif content_type.startswith("text/"):
return data_as_str
raise DeserializationError("Cannot deserialize content-type: {}".format(content_type))

@classmethod
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

from copy import deepcopy
from typing import Any, Awaitable
from typing_extensions import Self

from azure.core import AsyncPipelineClient
from azure.core.pipeline import policies
Expand Down Expand Up @@ -112,7 +113,7 @@ def _send_request(
async def close(self) -> None:
await self._client.close()

async def __aenter__(self) -> "AzureBlobStorage":
async def __aenter__(self) -> Self:
await self._client.__aenter__()
return self

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,11 @@
map_error,
)
from azure.core.pipeline import PipelineResponse
from azure.core.pipeline.transport import AsyncHttpResponse
from azure.core.rest import HttpRequest
from azure.core.rest import AsyncHttpResponse, HttpRequest
from azure.core.tracing.decorator_async import distributed_trace_async
from azure.core.utils import case_insensitive_dict

from ... import models as _models
from ..._vendor import _convert_request
from ...operations._append_blob_operations import (
build_append_block_from_url_request,
build_append_block_request,
Expand Down Expand Up @@ -207,7 +205,6 @@ async def create( # pylint: disable=inconsistent-return-statements
headers=_headers,
params=_params,
)
_request = _convert_request(_request)
_request.url = self._client.format_url(_request.url)

_stream = False
Expand Down Expand Up @@ -372,7 +369,6 @@ async def append_block( # pylint: disable=inconsistent-return-statements
headers=_headers,
params=_params,
)
_request = _convert_request(_request)
_request.url = self._client.format_url(_request.url)

_stream = False
Expand Down Expand Up @@ -574,7 +570,6 @@ async def append_block_from_url( # pylint: disable=inconsistent-return-statemen
headers=_headers,
params=_params,
)
_request = _convert_request(_request)
_request.url = self._client.format_url(_request.url)

_stream = False
Expand Down Expand Up @@ -696,7 +691,6 @@ async def seal( # pylint: disable=inconsistent-return-statements
headers=_headers,
params=_params,
)
_request = _convert_request(_request)
_request.url = self._client.format_url(_request.url)

_stream = False
Expand Down
Loading
Loading