Skip to content

Correct the README on BlobServiceClient arguments - #565

Merged
kyleknap merged 3 commits into
fsspec:mainfrom
itzzdev09:docs/service-client-kwargs
Nov 25, 2026
Merged

kyleknap merged 3 commits into
fsspec:mainfrom
itzzdev09:docs/service-client-kwargs

Conversation

@itzzdev09

@itzzdev09 itzzdev09 commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Closes #502.

The README said AzureBlobFileSystem accepts all of the async BlobServiceClient arguments. It doesn't: _create_aio_blob_service_client builds the client from the account URL, credential and location mode only, so arguments like retry_total are silently ignored, as #502 found. As @anjaliratnam-msft said there, the documentation is what's wrong.

Following review, this removes the sentence from the Append Blob section rather than rewording it, since the API reference already lists the accepted arguments.

Docs only; no code change.

AzureBlobFileSystem builds its own BlobServiceClient and does not forward
extra keyword arguments to it, so the claim that it accepts all of them was
wrong (and sat under the Append Blob heading). Say what happens instead.

Closes fsspec#502

@anjaliratnam-msft anjaliratnam-msft left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for creating a PR for this! I just had a couple small comments about the ordering/wording of it. @kyleknap Do you have any thoughts on the phrasing?

Comment thread README.md
- `sas_token`
- `tenant_id`, `client_id`, and `client_secret` are combined for an Azure ServicePrincipal e.g. `storage_options={'account_name': ACCOUNT_NAME, 'tenant_id': TENANT_ID, 'client_id': CLIENT_ID, 'client_secret': CLIENT_SECRET}`
- `anon`: bool, optional. Set to `True` to use anonymous authentication. If not set, the `AZURE_STORAGE_ANON` environment variable will be checked before defaulting to `False` where credentials are discovered on the system.
- `location_mode`: valid values are "primary" or "secondary" and apply to RA-GRS accounts

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that this doesn't belong in the append blob section but maybe instead of adding it to the end of the setting credentials section it can come right after here especially since the API reference is listed right after.

Comment thread README.md Outdated

### Append Blob
The `AzureBlobFileSystem` accepts [all of the Async BlobServiceClient arguments](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-python).
`AzureBlobFileSystem` creates its own `BlobServiceClient` and does not pass other [BlobServiceClient arguments](https://learn.microsoft.com/en-us/python/api/azure-storage-blob/azure.storage.blob.aio.blobserviceclient) such as `retry_total` through to it. When no other credential is given and `anon` is False, extra keyword arguments are passed to `DefaultAzureCredential` instead.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we move this earlier in the section, maybe we can shorten it to something like this:

AzureBlobFileSystem creates its own async BlobServiceClient from the arguments listed above. Other BlobServiceClient keyword arguments are not passed through to it.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anjaliratnam-msft Yeah I agree with shortening it. I'd honestly say we could just remove the sentence all together and not even mention which blob client we use and that we don't support the keyword args? Even with the update it sort of distracts from the sentence referencing the actual accepted arguments and not sure how much value this sentence brings when the reference page is fairly thorough. Thoughts?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that makes sense to me. @itzzdev09 Does this sound good to you?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good to me. I removed the sentence in fec9cca, so the PR now only drops the incorrect line from the Append Blob section and leaves the API reference to cover the accepted arguments.

@kyleknap kyleknap left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @itzzdev09! 🚢

@kyleknap
kyleknap merged commit a570f81 into fsspec:main Nov 25, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

kwargs not propagated to BlobServiceClient

3 participants