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

Make apiclient.sample_tools optional #525

Merged
merged 1 commit into from Jun 4, 2018

Conversation

Projects
None yet
4 participants
@epall
Copy link
Contributor

commented Jun 4, 2018

It depends heavily on oauth2client, which has been dropped as a required dependency

This seems to me like the quickest way to tackle #524, but it feels ugly. Maybe sample_tools needs to get re-written to use google-auth?

@googlebot googlebot added the cla: yes label Jun 4, 2018

from googleapiclient import sample_tools
except ImportError:
import sys
sys.stderr.write("""Warning: unable to import apiclient.sample_tools\n""")

This comment has been minimized.

Copy link
@theacodes

theacodes Jun 4, 2018

Member

Don't write to stderr, just ignore it. It'll give a standard import error if someone tries to from apiclient import sample_tools, and I'm okay with that (as they should be using from googleapiclient import sample_tools.

'schema': schema,
}

try:

This comment has been minimized.

Copy link
@theacodes

theacodes Jun 4, 2018

Member

just do sample_tools = None in the try..except above and you won't need to modify this at all.

Eric Wolak
Make apiclient.sample_tools optional
It depends heavily on oauth2client, which has been dropped as a required dependency

@epall epall force-pushed the epall:master branch from 5db640d to 88cb576 Jun 4, 2018

@epall

This comment has been minimized.

Copy link
Contributor Author

commented Jun 4, 2018

Thanks! Updated.

@theacodes theacodes merged commit 980c308 into googleapis:master Jun 4, 2018

2 checks passed

cla/google All necessary CLAs are signed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@tseaver

This comment has been minimized.

Copy link
Collaborator

commented Jun 15, 2018

Should there be a sample_tools extra added in setup.py, with a dep on oauth2client for now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.