Azure / Azure/azure-storage-python
BaseBlobService.get_blob_to_stream returns unusable Blob.content
- 主要言語
- Python
- スター
- 343
- フォーク
- 243
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
### Which service(blob, file, queue) does this issue concern?
Blob
### Which version of the SDK was used? Please provide the output of `pip freeze`.
```
azure-storage-blob==1.4.0
azure-storage-common==1.4.0
azure-storage-file==1.4.0
azure-storage-nspkg==3.0.0
azure-storage-queue==1.4.0
```
### What problem was encountered?
```python
import io
from azure.storage.blob.baseblobservice import BaseBlobService
blob_service = BaseBlobService(connection_string="...")
stream = io.BytesIO()
blob_file = blob_service.get_blob_to_stream("...", "...", stream=stream)
type(blob_file.content)
```
prints `NoneType`
What is the rationale for returning an empty [Blob.content](https://azure-storage.readthedocs.io/ref/azure.storage.blob.models.html#azure.storage.blob.models.Blob) in this case? I should be able to use `Blob.content`, instead I'm required to pass a `stream` object and use that one, which appears inconsistent with the rest of the get_blob_* methods based on `Blob.content` (e.g. `get_blob_to_text`, `get_blob_to_bytes`.
コントリビューションガイド
調査の方向性
Start in azure.storage.blob.baseblobservice.BaseBlobService.get_blob_to_stream and inspect how the returned Blob is populated when a stream is supplied. Compare its Blob.content behavior with get_blob_to_text and get_blob_to_bytes; done means the behavior is made consistent or the rationale and expected usage are clearly documented.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- azure, python
- 領域
- cloud
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100