Skip to content

Remove sync credentials#551

Open
jamesmyatt wants to merge 2 commits into
fsspec:mainfrom
jamesmyatt:remove-sync-creds
Open

Remove sync credentials#551
jamesmyatt wants to merge 2 commits into
fsspec:mainfrom
jamesmyatt:remove-sync-creds

Conversation

@jamesmyatt

@jamesmyatt jamesmyatt commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

The sync credentials were only created by internal methods, and only used in AzureBlobFile.connect_client, when the async credentials should have been preferred anyway.

Part of refactoring of do_connect-related logic: #504

Only used in connect_client, but that should use async ones anyway

@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.

Hi @jamesmyatt thanks for following up on refactoring the credential resolution. Even though it is technically a breaking change to remove the public sync_credential property, I'm in favor of the change (as you pointed out) sync credentials are no longer used and the project only documents usage of async credentials. So that will help clear up some confusion. Furthermore, previous maintainers were in favor of removing the sync credentials completely once the implementation no longer used sync creds: #132

Overall, from this first pass, the change looks good. For now, I just had a small comment about adding a changelog entry for it. Otherwise, I plan to pull down the change later this week to do a deeper review on it.

Comment thread adlfs/spec.py
)

creds = [self.fs.sync_credential, self.fs.account_key, self.fs.credential]
creds = [self.fs.credential, self.fs.account_key]

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.

Not actionable but just calling this out... Technically this is a change of behavior as before if a credential was provided to the file system a sync_credential would not be set and account_key would thus take precedence over the explicitly provided credential. That being said, this update seems reasonable as:

  1. It make it consistent with how the filesystem class resolves credentials (e.g. it prioritizes self.credential over self.account_key no matter what)
  2. In most cases, the container client will already be instantiated from the file system so this code path in general should not be hit unless connect_client is explicitly called.

Comment thread adlfs/spec.py
):
(
self.credential,
self.sync_credential,

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.

Could we add a changelog entry noting that we removed the sync_credential property as it was unused and label it as **Breaking** similar to other entries?

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.

2 participants