-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Updated Caching #20
Updated Caching #20
Conversation
from oauth2client.client import GoogleCredentials | ||
credentials = GoogleCredentials.get_application_default() | ||
if credentials.create_scoped_required(): | ||
credentials = credentials.create_scoped('https://www.googleapis.com/auth/bigquery') |
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.
Is create_scoped required here?
What is the strategy with the READMEs? |
I think we should put information in the highest directory such that it applies to all subdirectories. This way we avoid duplication, which is the purpose of these changes (just moved two identical files into their shared parent). |
Cool, sounds good |
more Squashage |
credentials = GoogleCredentials.get_application_default() | ||
if credentials.create_scoped_required(): | ||
credentials = credentials.create_scoped('https://www.googleapis.com/auth/bigquery') | ||
return build('bigquery','v2', credentials=GoogleCredentials.get_application_default()) |
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.
When I run tox, I get this error:
(python-docs-samples)rennie@rennie:~/gitrepos/python-docs-samples$ tox
py27-nosetest installed: Flask==0.10.1,google-api-python-client==1.4.0,httplib2==0.9.1,itsdangerous==0.24,Jinja2==2.7.3,MarkupSafe==0.23,mock==1.0.1,nose==1.3.6,NoseGAE==0.5.7,oauth2client==1.4.11,pyasn1==0.1.7,pyasn1-modules==0.0.5,rsa==3.1.4,simplejson==3.7.1,six==1.9.0,uritemplate==0.6,Werkzeug==0.10.4
py27-nosetest runtests: PYTHONHASHSEED='4074483713'
py27-nosetest runtests: commands[0] | nosetests --with-gae
EEEEE..S.................
ERROR: test_async_query (bigquery.test.test_async_query.TestAsyncQuery)
Traceback (most recent call last):
File "/usr/local/google/home/rennie/gitrepos/python-docs-samples/bigquery/test/test_async_query.py", line 28, in test_async_query
5):
File "/usr/local/google/home/rennie/gitrepos/python-docs-samples/bigquery/samples/async_query.py", line 48, in run
service = get_service()
File "/usr/local/google/home/rennie/gitrepos/python-docs-samples/bigquery/samples/utils.py", line 23, in get_service
return build('bigquery','v2', credentials=GoogleCredentials.get_application_default())
NameError: global name 'build' is not defined
My prior errors were due to the fact that I clicked the "Google internal-only" box when I created the project. Now I'm seeing this error: ...E...S..................ERROR: test_stream_row_to_bigquery (bigquery.tests.test_streaming.TestStreaming)Traceback (most recent call last): |
@SurferJeffAtGoogle Ideally, the test setup should be able to take care of them. |
closed to merge from branch. |
* docs: add long timeout code snippet * fix lint * add timeout
* docs: add long timeout code snippet * fix lint * add timeout
No description provided.