Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 4 additions & 1 deletion sdk/storage/azure-storage-blob/HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@
**Dependency updates**
- Adopted [azure-core](https://pypi.org/project/azure-core/) 1.0.0b2
- If you later want to revert to azure-storage-blob 12.0.0b1, or another Azure SDK
library requiring azure-core 1.0.0b1, you'll need to `pip uninstall azure-core`
library requiring azure-core 1.0.0b1, you must explicitly install azure-core
1.0.0b1 as well. For example:

`pip install azure-core==1.0.0b1 azure-storage-blob==12.0.0b1`

**Fixes and improvements**
- Fix for SAS URL encoding (#6500)
Expand Down
3 changes: 2 additions & 1 deletion sdk/storage/azure-storage-blob/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ from azure.storage.blob import BlobClient
blob = BlobClient.from_connection_string("my_connection_string", container="mycontainer", blob="my_blob")

with open("./BlockDestination.txt", "wb") as my_blob:
my_blob.writelines(blob.download_blob())
blob_data = blob.download_blob()
my_blob.writelines(blob_data.content_as_bytes())
```

### Enumerating blobs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ def _create_pipeline(self, credential, **kwargs):
if 'connection_timeout' not in kwargs:
kwargs['connection_timeout'] = DEFAULT_SOCKET_TIMEOUT[0] # type: ignore
if not config.transport:
from azure.core.pipeline.transport import AioHttpTransport
try:
from azure.core.pipeline.transport import AioHttpTransport
except ImportError:
raise ImportError("Unable to create async transport. Please check aiohttp is installed.")
config.transport = AioHttpTransport(**kwargs)
policies = [
QueueMessagePolicy(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,6 @@ def setUp(self):
self.source_blob_data = self.get_random_bytes(SOURCE_BLOB_SIZE)

blob = self.bsc.get_blob_client(self.container_name, self.source_blob_name)
if not self.is_playback():
self.bsc.create_container(self.container_name)
blob.upload_blob(self.source_blob_data)

# generate a SAS so that it is accessible with a URL
sas_token = blob.generate_shared_access_signature(
Expand Down
5 changes: 4 additions & 1 deletion sdk/storage/azure-storage-file/HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@
**Dependency updates**
- Adopted [azure-core](https://pypi.org/project/azure-core/) 1.0.0b2
- If you later want to revert to azure-storage-file 12.0.0b1, or another Azure SDK
library requiring azure-core 1.0.0b1, you'll need to `pip uninstall azure-core`
library requiring azure-core 1.0.0b1, you must explicitly install azure-core
1.0.0b1 as well. For example:

`pip install azure-core==1.0.0b1 azure-storage-file==12.0.0b1`

**Fixes and improvements**
- Fix for closing file handles - continuation token was not being passed to subsequent calls.
Expand Down
4 changes: 2 additions & 2 deletions sdk/storage/azure-storage-file/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,10 @@ Upload a file to the share
```python
from azure.storage.file import FileClient

file = FileClient.from_connection_string("my_connection_string", share="share", file_path="myfile")
file_client = FileClient.from_connection_string("my_connection_string", share="share", file_path="myfile")

with open("./SampleSource.txt", "rb") as source_file:
file.upload_file(source_file)
file_client.upload_file(source_file)
```

## Troubleshooting
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ def _create_pipeline(self, credential, **kwargs):
if 'connection_timeout' not in kwargs:
kwargs['connection_timeout'] = DEFAULT_SOCKET_TIMEOUT[0] # type: ignore
if not config.transport:
from azure.core.pipeline.transport import AioHttpTransport
try:
from azure.core.pipeline.transport import AioHttpTransport
except ImportError:
raise ImportError("Unable to create async transport. Please check aiohttp is installed.")
config.transport = AioHttpTransport(**kwargs)
policies = [
QueueMessagePolicy(),
Expand Down
5 changes: 4 additions & 1 deletion sdk/storage/azure-storage-queue/HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
**Dependency updates**
- Adopted [azure-core](https://pypi.org/project/azure-core/) 1.0.0b2
- If you later want to revert to azure-storage-queue 12.0.0b1, or another Azure SDK
library requiring azure-core 1.0.0b1, you'll need to `pip uninstall azure-core`
library requiring azure-core 1.0.0b1, you must explicitly install azure-core
1.0.0b1 as well. For example:

`pip install azure-core==1.0.0b1 azure-storage-queue==12.0.0b1`

**Fixes and improvements**
- General refactor of duplicate and shared code.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -597,9 +597,6 @@ class StorageServiceProperties(Model):
'hour_metrics': {'key': 'HourMetrics', 'type': 'Metrics', 'xml': {'name': 'HourMetrics'}},
'minute_metrics': {'key': 'MinuteMetrics', 'type': 'Metrics', 'xml': {'name': 'MinuteMetrics'}},
'cors': {'key': 'Cors', 'type': '[CorsRule]', 'xml': {'name': 'Cors', 'itemsName': 'CorsRule', 'wrapped': True}},
'default_service_version': {'key': 'DefaultServiceVersion', 'type': 'str', 'xml': {'name': 'DefaultServiceVersion'}},
'delete_retention_policy': {'key': 'DeleteRetentionPolicy', 'type': 'RetentionPolicy', 'xml': {'name': 'DeleteRetentionPolicy'}},
'static_website': {'key': 'StaticWebsite', 'type': 'StaticWebsite', 'xml': {'name': 'StaticWebsite'}},
}
_xml_map = {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ def _create_pipeline(self, credential, **kwargs):
if 'connection_timeout' not in kwargs:
kwargs['connection_timeout'] = DEFAULT_SOCKET_TIMEOUT[0] # type: ignore
if not config.transport:
from azure.core.pipeline.transport import AioHttpTransport
try:
from azure.core.pipeline.transport import AioHttpTransport
except ImportError:
raise ImportError("Unable to create async transport. Please check aiohttp is installed.")
config.transport = AioHttpTransport(**kwargs)
policies = [
QueueMessagePolicy(),
Expand Down