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

Upgrade oauth2client dependency to >2 to be compatible with google-api-python-client #355

Closed
maxgrenderjones opened this issue Apr 19, 2016 · 7 comments

Comments

@maxgrenderjones
Copy link

In setup.py gsutil requires oauth2client==1.5.2. The latest version of google-api-python-client on pypi (version 1.5.0 at the time of reporting) requires oauth2client > 2.

While it does look like this restriction has been removed in the latest version of setup.py - relevant commit it feels like it would be better to allow gsutil to work with later versions of oauth2client rather than force google-api-client to work with earlier ones.

@thobrla
Copy link
Contributor

thobrla commented Apr 19, 2016

oauth2client >= 2 introduced some backwards-incompatible changes, which is why gsutil didn't migrate immediately. The eventual plan is to migrate to oauthclient >= 2, but we don't have a timeline for that yet.

@maxgrenderjones
Copy link
Author

Is it not possible to support both at the same time?

for example, replace:

from oauth2client.client import SignedJwtAssertionCredentials

with

from oauth2client.service_account import ServiceAccountCredentials

(and change the credential creation calls to match the slightly different API)

and elsewhere (the change required to enable version agnosticism from google-api-python-client):

try:
    from oauth2client.contrib.locked_file import LockedFile
except ImportError:
    # oauth2client < 2.0.0
    from oauth2client.locked_file import LockedFile

I guess I should really be railing at the oauth2client folks for:
a) breaking the API (ok, has to be done sometimes) and
b) not providing comprehensive migration docs (although there is some help, seemingly incomplete, in their release notes )

@thobrla
Copy link
Contributor

thobrla commented Apr 19, 2016

We can try this approach, but there's no guarantee that the changes needed to support both versions in google-api-python-client are sufficient to cover all of gsutil's use cases. So it requires development and testing effort.

@maxgrenderjones
Copy link
Author

maxgrenderjones commented Apr 19, 2016

Fair enough (super impressive reply speed btw) - you may find some useful pointers (amidst the grumbling at breakage) at googleapis/oauth2client#401

I was only trying to imply that it appears to be possible (seemingly they're not that different) rather than suggesting no work was required!

@dymov
Copy link

dymov commented Jun 26, 2017

Is there any workaround for this? As for now, it seems to be impossible to use both libraries in the same project?

@houglum
Copy link
Collaborator

houglum commented Jun 29, 2017

I'll be looking into the work required to bump the oauth2client version dependency to 4.X.X at some point in the near future, but I don't have any solid ETA to give at the moment. Just letting you know that it's on my radar :)

@vapier
Copy link

vapier commented Mar 29, 2018

can we close this now since 114fc88 updated things to 4.1.2 ?

@houglum houglum closed this as completed Mar 29, 2018
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

5 participants