-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Open
Labels
ClientThis issue points to a problem in the data-plane of the library.This issue points to a problem in the data-plane of the library.Service AttentionWorkflow: This issue is responsible by Azure service team.Workflow: This issue is responsible by Azure service team.StorageStorage Service (Queues, Blobs, Files)Storage Service (Queues, Blobs, Files)needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamWorkflow: This issue needs attention from Azure service team or SDK team
Description
- Package Name:
azure-storage-blob - Package Version: 12.27.0
- Operating System:
- Python Version:
Describe the bug
In the latest version of the blob SDK, mypy is throwing errors for client properties such as blob_name and container_name. This started happening in 12.27.0.
To Reproduce
Steps to reproduce the behavior:
- Install SDK and mypy
> uv venv -p 3.12
Using CPython 3.12.10
Creating virtual environment at: .venv
Activate with: .venv\Scripts\activate
> .\.venv\Scripts\activate
(repro-mypy-issue) > uv pip install azure-storage-blob
Resolved 12 packages in 345ms
Installed 12 packages in 239ms
+ azure-core==1.36.0
+ azure-storage-blob==12.27.0
+ certifi==2025.10.5
+ cffi==2.0.0
+ charset-normalizer==3.4.4
+ cryptography==46.0.3
+ idna==3.11
+ isodate==0.7.2
+ pycparser==2.23
+ requests==2.32.5
+ typing-extensions==4.15.0
+ urllib3==2.5.0
(repro-mypy-issue) > uv pip install mypy
Resolved 4 packages in 275ms
Prepared 2 packages in 4.36s
Installed 3 packages in 719ms
+ mypy==1.18.2
+ mypy-extensions==1.1.0
+ pathspec==0.12.1- Create this
sample.pyscript:
from azure.storage.blob import BlobClient
client = BlobClient(
"account_url",
"container",
"blob"
)
client.container_name
client.blob_name- Run mypy:
(repro-mypy-issue) > mypy .\sample.py
sample.py:8: error: "BlobClient" has no attribute "container_name" [attr-defined]
sample.py:9: error: "BlobClient" has no attribute "blob_name" [attr-defined]
Found 2 errors in 1 file (checked 1 source file)- Confirm it works on version before:
(repro-mypy-issue) > uv pip install azure-storage-blob==12.26.0
Resolved 12 packages in 35ms
Uninstalled 1 package in 30ms
Installed 1 package in 202ms
- azure-storage-blob==12.27.0
+ azure-storage-blob==12.26.0
(repro-mypy-issue) > mypy .\sample.py
Success: no issues found in 1 source fileMetadata
Metadata
Assignees
Labels
ClientThis issue points to a problem in the data-plane of the library.This issue points to a problem in the data-plane of the library.Service AttentionWorkflow: This issue is responsible by Azure service team.Workflow: This issue is responsible by Azure service team.StorageStorage Service (Queues, Blobs, Files)Storage Service (Queues, Blobs, Files)needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamWorkflow: This issue needs attention from Azure service team or SDK team