-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Replace oauth2client by google-auth #2361
Conversation
This PR is changing a module I don't know so much about. Can you do a |
@constantijn @freider @mikekap Does it seem to make sense to you? Thanks! |
While it is not directly related, maybe googleapis/google-api-python-client#299 could be handled at the same time (because it touches the very same codepath)? It should be as simple as passing |
The Dataproc plugin looks good to me. If the tests work then +1 for me. |
My only concern is: given there’s no flavors of Luigi, this is effectively a breaking change. Would it make sense to fall back to oauth2client with a loud warning if the new lib isn’t installed? |
Is there any user-required action other than installing the correct library? If not, i'd say force the change and make a huge note of it in the release notes for 2.7.3 (or whichever next version after this PR is merged). |
They're all in |
@dlstadther No, there is no user-required action. The two API calls do the same thing, that is try and get the current gcloud application default login on the system. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Not entirely sure, but it seems https://github.com/google/google-api-python-client/blob/master/googleapiclient/_auth.py#L95 would fail due to missing Found the following issue when using
|
As discussed here #2361 (comment) This is used by https://github.com/google/google-api-python-client/blob/v1.6.6/googleapiclient/discovery.py#L371 Another option is to fix `luigi.contrib.bigquery` somehow.
As mentioned in https://github.com/google/oauth2client, oauth2client is now deprecated and Google recommends using google-auth (https://github.com/GoogleCloudPlatform/google-auth-library-python).
This PR replaces all usages of
oauth2client
bygoogle-auth
Description
oauth2client
was only used to get the application default login. The PR replaces the call to the equivalent call in google-auth, and changes the documentation to match.Motivation and Context
I had problems using Luigi with the latest version of
oauth2client
. Rather than downgrading, I decided to update the code.Have you tested this? If so, how?
I am using the contrib modules
gcs
andgcp
in production. I have no use of the other modules, however, and did not test the changes in those. The changes in the other modules are exactly the same asgcs
andgcp
, but I would really appreciate it if someone who makes use of these modules could confirm that nothing broke!