Skip to content

Commit

Permalink
[Storage] [STG93] STG93 Feature Branch -> Main (#34921)
Browse files Browse the repository at this point in the history
* [Storage] [STG93] Prepare for STG93 Feature Work (#33869)

* Bump sv=, F+R recordings, add changelog entry

* Bump changefeed blobs dep to lastest GA release

* Add changelog entry for changefeed's blob dependency

* [Storage] [STG93] Return `client_name` field on ListHandles API (#33878)

* [Storage] [STG93] Rename Support for List Ranges Diff API (#33893)

* [Storage] [STG93] Support owner/group/permission/acl on put APIs and `x-ms-upn` header (#33925)

* Missed upn hint here (#33998)

* [Storage] [STG93] Archboard Feedback STG93 (#34083)

* Target right place

* Correction

* Fighting the assets.json

* [Storage] [STG93] Update changelogs to prep for beta release (#34312)

* Add changelogs

* Nit

* [Storage] [STG93] Fix Blob Recordings (`sv=` F&R) (#34928)

* Fix Blob failing CI, F+R recordings sv=

* Fix missing recordings

* Bring back F+R recordings

* Add missing recordings for feature added to main b/w this times recordings

* Generated code all packages, adjust changelogs to merge before release

* Update file-share reference for swagger
  • Loading branch information
vincenttran-msft authored Apr 2, 2024
1 parent 54682bc commit d48629e
Show file tree
Hide file tree
Showing 94 changed files with 2,486 additions and 4,817 deletions.
3 changes: 2 additions & 1 deletion .vscode/cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -1356,7 +1356,8 @@
"Ffile",
"Fsubdir",
"Fdir",
"adal"
"adal",
"mytestshare"
]
},
{
Expand Down
5 changes: 2 additions & 3 deletions sdk/storage/azure-storage-blob-changefeed/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@

This version and all future versions will require Python 3.8+. Python 3.6 and 3.7 are no longer supported.

### Features Added

### Bugs Fixed
### Other Changes
- Bumped dependency of `azure-storage-blob` to the latest stable release (12.19.0).

### 12.0.0b4 (2022-06-15)

Expand Down
2 changes: 1 addition & 1 deletion sdk/storage/azure-storage-blob-changefeed/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,6 @@
},
python_requires=">=3.8",
install_requires=[
"azure-storage-blob>=12.14.1,<13.0.0"
"azure-storage-blob>=12.19.1,<13.0.0"
],
)
1 change: 1 addition & 0 deletions sdk/storage/azure-storage-blob/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
This version and all future versions will require Python 3.8+. Python 3.7 is no longer supported.

### Features Added
- Added support for service version 2024-05-04.
- The `services` parameter has been added to the `generate_account_sas` API, which enables the ability to generate SAS
tokens to be used with multiple services. By default, the SAS token service scope will default to the current service.

Expand Down
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_20d52f0450"
"Tag": "python/storage/azure-storage-blob_fa839739c1"
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from typing import Any

from azure.core import PipelineClient
from azure.core.pipeline import policies
from azure.core.rest import HttpRequest, HttpResponse

from . import models as _models
Expand Down Expand Up @@ -54,7 +55,24 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential
self, url: str, base_url: str = "", **kwargs: Any
) -> None:
self._config = AzureBlobStorageConfiguration(url=url, **kwargs)
self._client: PipelineClient = PipelineClient(base_url=base_url, config=self._config, **kwargs)
_policies = kwargs.pop("policies", None)
if _policies is None:
_policies = [
policies.RequestIdPolicy(**kwargs),
self._config.headers_policy,
self._config.user_agent_policy,
self._config.proxy_policy,
policies.ContentDecodePolicy(**kwargs),
self._config.redirect_policy,
self._config.retry_policy,
self._config.authentication_policy,
self._config.custom_hook_policy,
self._config.logging_policy,
policies.DistributedTracingPolicy(**kwargs),
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
self._config.http_logging_policy,
]
self._client: PipelineClient = PipelineClient(base_url=base_url, policies=_policies, **kwargs)

client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
self._serialize = Serializer(client_models)
Expand All @@ -67,7 +85,7 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential
self.append_blob = AppendBlobOperations(self._client, self._config, self._serialize, self._deserialize)
self.block_blob = BlockBlobOperations(self._client, self._config, self._serialize, self._deserialize)

def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
"""Runs the network request through the client's chained policies.
>>> from azure.core.rest import HttpRequest
Expand All @@ -87,7 +105,7 @@ def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:

request_copy = deepcopy(request)
request_copy.url = self._client.format_url(request_copy.url)
return self._client.send_request(request_copy, **kwargs)
return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore

def close(self) -> None:
self._client.close()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,14 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

import sys
from typing import Any
from typing import Any, Literal

from azure.core.configuration import Configuration
from azure.core.pipeline import policies

if sys.version_info >= (3, 8):
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
else:
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports

VERSION = "unknown"


class AzureBlobStorageConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
class AzureBlobStorageConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
"""Configuration for AzureBlobStorage.
Note that all parameters used to create this instance are saved as instance
Expand All @@ -35,7 +28,6 @@ class AzureBlobStorageConfiguration(Configuration): # pylint: disable=too-many-
"""

def __init__(self, url: str, **kwargs: Any) -> None:
super(AzureBlobStorageConfiguration, self).__init__(**kwargs)
version: Literal["2021-12-02"] = kwargs.pop("version", "2021-12-02")

if url is None:
Expand All @@ -44,6 +36,7 @@ def __init__(self, url: str, **kwargs: Any) -> None:
self.url = url
self.version = version
kwargs.setdefault("sdk_moniker", "azureblobstorage/{}".format(VERSION))
self.polling_interval = kwargs.get("polling_interval", 30)
self._configure(**kwargs)

def _configure(self, **kwargs: Any) -> None:
Expand All @@ -52,7 +45,7 @@ def _configure(self, **kwargs: Any) -> None:
self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)
self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs)
self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs)
self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs)
self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs)
self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
self.authentication_policy = kwargs.get("authentication_policy")
Loading

0 comments on commit d48629e

Please sign in to comment.