Skip to content

Replace oauth2client by google-auth #37

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

Closed
ktong opened this issue May 16, 2017 · 4 comments
Closed

Replace oauth2client by google-auth #37

ktong opened this issue May 16, 2017 · 4 comments

Comments

@ktong
Copy link

ktong commented May 16, 2017

oauth2client is now deprecated. No more features will be added to the libraries and the core team is turning down support. We recommend you use google-auth and oauthlib.

@tswast
Copy link
Collaborator

tswast commented May 16, 2017

The latest versions of google-api-python-client support google-auth. See: googleapis/google-api-python-client#397 (comment) This package should be able to do this with only some changes to setup.py.

@ktong
Copy link
Author

ktong commented May 16, 2017

It also need change the way to get application default credentials

try:
            from oauth2client.client import GoogleCredentials
        except ImportError:
            return None

        try:
            credentials = GoogleCredentials.get_application_default()
        except:
            return None

@ktong
Copy link
Author

ktong commented May 16, 2017

the new function is google.auth.default()

@tswast
Copy link
Collaborator

tswast commented May 17, 2017

I started on this in https://github.com/tswast/pandas-gbq/tree/gbq-37. It uses google-auth for service accounts and application default credentials. I'll update it to use google-auth for user credentials tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants