Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_credential() in CredentialProvider is not async for async client #3422

Open
yulin-li opened this issue Nov 3, 2024 · 0 comments
Open

Comments

@yulin-li
Copy link

yulin-li commented Nov 3, 2024

Thanks for wanting to report an issue you've found in redis-py. Please delete this text and fill in the template below.
It is of course not always possible to reduce your code to a small test case, but it's highly appreciated to have as much data as possible. Thank you!

Version: What redis-py and what redis version is the issue happening on?

Platform: What platform / version? (For example Python 3.5.1 on Windows 7 / Ubuntu 15.10 / Azure)

Description: Description of your issue, stack traces from errors and code that reproduces the issue

The async version of Redis client takes credential_provider as argument while the get_credential() method is not an async method.

I think a better version should be

class CredentialProvider:
    """
    Credentials Provider.
    """

    async def get_credentials(self) -> Union[Tuple[str], Tuple[str, str]]:
        raise NotImplementedError("get_credentials must be implemented")
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

No branches or pull requests

1 participant