Skip to content

Clarify async credential requirement and update examples#537

Open
nateprewitt wants to merge 2 commits intofsspec:mainfrom
nateprewitt:handle_sync_creds
Open

Clarify async credential requirement and update examples#537
nateprewitt wants to merge 2 commits intofsspec:mainfrom
nateprewitt:handle_sync_creds

Conversation

@nateprewitt
Copy link
Collaborator

adlfs uses the async Azure SDK under the hood, which requires async credentials. A common source of issues is users passing synchronous credentials (e.g. azure.identity.DefaultAzureCredential) instead of their async counterparts (azure.identity.aio.DefaultAzureCredential). This was partly due to inaccurate documentation in the project which should now be fixed.

For almost all users, the preferred option is to use anon=False (soon to be default) when instantiating your file system. This allows the SDK to auto-detect the right credentials. If you must supply credentials directly, make sure you're using the async version.

This PR:

  • Emits a FutureWarning when synchronous credentials are detected
  • Adds a CredentialType alias for accurate type checking
  • Updates docs and README to recommend anon=False over passing credential objects directly, and corrects references to point to azure.identity.aio

Copy link
Collaborator

@anjaliratnam-msft anjaliratnam-msft left a comment

Choose a reason for hiding this comment

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

This looks good to me!

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