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

Fix a regression with "get_driver()" function not working with string values #1391

Merged
merged 4 commits into from
Dec 19, 2019

Conversation

Kami
Copy link
Member

@Kami Kami commented Dec 18, 2019

This pull request fixes a regression which was inadvertently introduced in #1306 as part of MyPy refactoring changes.

That change broke get_driver() method so it doesn't work anymore if provider argument is a string and not an Provider.FOO enum type.

Only officially supported and recommended approach still is to use Provider.FOO enum constants, but since string notation was supported in the past and likely a lot of the existing code relies on it, we should still support (at least until we have the time to properly officially deprecate and remove support for it).

Resolves #1390.

Kami added 2 commits December 18, 2019 22:38
"provider" value is a string and not an enum.

In reality, "provider" value should really be a Provider ENUM constant
type, but previous versions supported strings as well so it makes sense
to still support that notation until a future major release.
@Kami Kami merged commit 3e8700d into apache:trunk Dec 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can no longer get driver by provider name string
1 participant