-
Notifications
You must be signed in to change notification settings - Fork 6.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
Update samples to support latest Google Cloud Python #656
Merged
Merged
Changes from 2 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
6351867
Update to latest google-cloud-python
d106640
Fix some minor nox issues
91847ca
Update datastore samples for new google-cloud-python
1374be3
Update bigquery samples to use latest google-cloud
20d9de9
Update dns samples to use latest google-cloud
11575bc
Update logging samples to use latest google-cloud
f691fbd
Update pubsub samples to use latest google-cloud
22e3d53
Update storage samples to use latest google-cloud
03b27e8
Fix lint
3568981
Fix lint
49405df
Vision quickstart no longer fails on Py3
ce4c736
Address review comment.
ffdf1ca
Fix bigquery installed app sample
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
Flask==0.11.1 | ||
gunicorn==19.6.0 | ||
requests[security]==2.11.1 | ||
requests[security]==2.12.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Flask==0.11.1 | ||
google-cloud-datastore==0.20.1 | ||
google-cloud-datastore==0.21.0 | ||
gunicorn==19.6.0 | ||
oauth2client==4.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,4 @@ flask-cors==3.0.2 | |
gunicorn==19.6.0 | ||
six==1.10.0 | ||
pyyaml==3.12 | ||
requests==2.11.1 | ||
requests==2.12.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
gunicorn==19.6.0 | ||
oauth2client==4.0.0 | ||
kinto==4.3.2 | ||
kinto==4.3.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
Flask==0.11.1 | ||
gunicorn==19.6.0 | ||
requests[security]==2.11.1 | ||
requests[security]==2.12.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Flask==0.11.1 | ||
gunicorn==19.6.0 | ||
requests[security]==2.11.1 | ||
requests[security]==2.12.0 | ||
mailjet-rest==v1.2.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
Flask==0.11.1 | ||
gunicorn==19.6.0 | ||
requests[security]==2.11.1 | ||
requests[security]==2.12.0 |
2 changes: 1 addition & 1 deletion
2
appengine/flexible/multiple_services/gateway-service/requirements.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
Flask==0.11.1 | ||
gunicorn==19.6.0 | ||
requests==2.11.1 | ||
requests==2.12.0 |
2 changes: 1 addition & 1 deletion
2
appengine/flexible/multiple_services/static-service/requirements.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
Flask==0.11.1 | ||
gunicorn==19.6.0 | ||
requests==2.11.1 | ||
requests==2.12.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Flask==0.11.1 | ||
google-cloud-pubsub==0.20.0 | ||
google-cloud-pubsub==0.21.0 | ||
gunicorn==19.6.0 | ||
oauth2client==4.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
Flask==0.11.1 | ||
sendgrid==3.6.2 | ||
sendgrid==3.6.3 | ||
gunicorn==19.6.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
Flask==0.11.1 | ||
google-cloud-storage==0.20.0 | ||
google-cloud-storage==0.21.0 | ||
gunicorn==19.6.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
Flask==0.11.1 | ||
requests==2.11.1 | ||
requests==2.12.0 | ||
requests-toolbelt==0.7.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
flask==0.11.1 | ||
requests==2.11.1 | ||
requests==2.12.0 | ||
requests_toolbelt==0.7.0 | ||
oauth2client==4.0.0 | ||
functools32==3.2.3-2; python_version < "3" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Flask==0.11.1 | ||
requests==2.11.1 | ||
requests==2.12.0 | ||
requests-toolbelt==0.7.0 | ||
mailjet-rest==v1.2.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
sendgrid==3.6.2 | ||
sendgrid==3.6.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
Flask==0.11.1 | ||
requests==2.11.1 | ||
requests==2.12.0 | ||
requests-toolbelt==0.7.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
google-cloud-bigquery==0.20.0 | ||
google-cloud-bigquery==0.21.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
flake8==3.0.4 | ||
google-cloud-bigquery==0.20.0 | ||
flake8==3.2.0 | ||
google-cloud-bigquery==0.21.0 | ||
PyMySQL==0.7.9 | ||
six==1.10.0 | ||
SQLAlchemy==1.1.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
google-cloud-bigtable==0.20.0 | ||
google-cloud-bigtable==0.21.0 |
2 changes: 1 addition & 1 deletion
2
blog/introduction_to_data_models_in_cloud_datastore/requirements.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
google-cloud-datastore==0.20.1 | ||
google-cloud-datastore==0.21.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
requests==2.11.1 | ||
requests==2.12.0 | ||
google-api-python-client==1.5.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
cryptography==1.5.3 | ||
requests==2.11.1 | ||
requests==2.12.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
requests==2.11.1 | ||
requests==2.12.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Flask==0.11.1 | ||
requests==2.11.1 | ||
requests==2.12.0 | ||
sleekxmpp==1.3.1 | ||
six==1.10.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
google-api-python-client==1.5.5 | ||
google-cloud==0.20.0 | ||
google-cloud==0.21.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
google-cloud-datastore==0.20.1 | ||
google-cloud-datastore==0.21.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
google-cloud-dns==0.20.0 | ||
google-cloud-dns==0.21.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,4 @@ flask-cors==3.0.2 | |
gunicorn==19.6.0 | ||
six==1.10.0 | ||
pyyaml==3.12 | ||
requests==2.11.1 | ||
requests==2.12.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
google-api-python-client==1.5.5 | ||
requests==2.11.1 | ||
requests==2.12.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
google-cloud-logging==0.20.0 | ||
google-cloud-logging==0.21.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,6 +48,7 @@ | |
|
||
# Libraries that only work on Python 2.7 | ||
PY27_ONLY_LIBRARIES = ['mysql-python'] | ||
IGNORED_LIBRARIES = ['pylibmc'] | ||
|
||
# Whether we're running on Travis CI | ||
ON_TRAVIS = os.environ.get('TRAVIS', False) | ||
|
@@ -245,7 +246,7 @@ def session_lint(session): | |
sample_directories = ( | ||
sample_dir for subdir in subdirs if not subdir.startswith('.') | ||
for sample_dir in collect_sample_dirs( | ||
subdir, suffix='.py', blacklist='conftest.py')) | ||
subdir, suffix='.py', blacklist='conftest.py')) | ||
|
||
# On travis, only lint changed samples. | ||
if ON_TRAVIS: | ||
|
@@ -286,7 +287,7 @@ def session_reqcheck(session): | |
command = 'check-requirements' | ||
|
||
reqfiles = list(list_files('.', 'requirements*.txt')) | ||
reqfiles.append('requirements-dev.in') | ||
reqfiles.append('testing/requirements-dev.in') | ||
|
||
for reqfile in reqfiles: | ||
session.run('gcprepotools', command, reqfile) | ||
|
@@ -297,6 +298,7 @@ def session_reqrollup(session): | |
|
||
This does not test for uniqueness. pip itself will validate that. | ||
""" | ||
session.virtualenv = False | ||
requirements = set() | ||
requirements_files = list(list_files('.', 'requirements*.txt')) | ||
requirements_files.append('./testing/requirements-dev.in') | ||
|
@@ -317,9 +319,19 @@ def mark_if_necessary(requirement): | |
requirement.strip()) | ||
return requirement | ||
|
||
def is_ignored(requirement): | ||
"""Ignores certain libraries.""" | ||
for library in IGNORED_LIBRARIES: | ||
if requirement.startswith(library): | ||
return True | ||
|
||
requirements = [ | ||
mark_if_necessary(requirement) for requirement in requirements] | ||
|
||
requirements = [ | ||
requirement for requirement in requirements if not | ||
is_ignored(requirement)] | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could put this conditional in the previous comprehension, no? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd rather not. |
||
with open('testing/requirements-dev.txt', 'w') as f: | ||
f.write('# This file is generated by nox -s reqrollup. Do not edit.\n') | ||
for requirement in sorted(requirements, key=lambda s: s.lower()): | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
google-cloud-pubsub==0.20.0 | ||
google-cloud-pubsub==0.21.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
google-cloud-storage==0.20.0 | ||
google-cloud-storage==0.21.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
google-cloud-vision==0.20.0 | ||
google-cloud-vision==0.21.0 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Could do this more succinctly:
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.
I like it, but it's almost too clever. I'm going to leave as-is for now.
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.
Don't care either way but don't think it's too clever, a bit more English-esque if anything.