Skip to content

Commit 57fbe30

Browse files
dpebotJon Wayne Parrott
authored andcommitted
Auto-update dependencies. (#1004)
* Auto-update dependencies. * Fix natural language samples * Fix pubsub iam samples * Fix language samples * Fix bigquery samples
1 parent f21866f commit 57fbe30

File tree

44 files changed

+62
-109
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+62
-109
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
Flask==0.12.2
2-
google-cloud-datastore==1.0.0
2+
google-cloud-datastore==1.1.0
33
gunicorn==19.7.1
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
Flask==0.12.2
2-
google-cloud-pubsub==0.25.0
2+
google-cloud-pubsub==0.26.0
33
gunicorn==19.7.1
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
Flask==0.12.2
2-
google-cloud-storage==1.1.1
2+
google-cloud-storage==1.2.0
33
gunicorn==19.7.1

auth/cloud-client/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
google-cloud-storage==1.1.1
1+
google-cloud-storage==1.2.0

bigquery/api/resources/data.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Gandalf, 2000, 140.0, 1
1+
Gandalf,2000,140.0,1

bigquery/cloud-client/async_query.py

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -48,20 +48,9 @@ def async_query(query):
4848

4949
wait_for_job(query_job)
5050

51-
# Drain the query results by requesting a page at a time.
52-
query_results = query_job.results()
53-
page_token = None
54-
55-
while True:
56-
rows, total_rows, page_token = query_results.fetch_data(
57-
max_results=10,
58-
page_token=page_token)
59-
60-
for row in rows:
61-
print(row)
62-
63-
if not page_token:
64-
break
51+
rows = query_job.results().fetch_data(max_results=10)
52+
for row in rows:
53+
print(row)
6554

6655

6756
if __name__ == '__main__':

bigquery/cloud-client/query_params.py

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -43,19 +43,10 @@ def wait_for_job(job):
4343

4444

4545
def print_results(query_results):
46-
"""Print the query results by requesting a page at a time."""
47-
page_token = None
48-
49-
while True:
50-
rows, total_rows, page_token = query_results.fetch_data(
51-
max_results=10,
52-
page_token=page_token)
53-
54-
for row in rows:
55-
print(row)
56-
57-
if not page_token:
58-
break
46+
"""Print the rows in the query's results."""
47+
rows = query_results.fetch_data(max_results=10)
48+
for row in rows:
49+
print(row)
5950

6051

6152
def query_positional_params(corpus, min_word_count):

bigquery/cloud-client/query_params_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ def test_query_named_params(capsys):
2828
corpus='romeoandjuliet',
2929
min_word_count=100)
3030
out, _ = capsys.readouterr()
31-
assert 'love' in out
31+
assert 'the' in out
3232

3333

3434
def test_query_positional_params(capsys):
3535
query_params.query_positional_params(
3636
corpus='romeoandjuliet',
3737
min_word_count=100)
3838
out, _ = capsys.readouterr()
39-
assert 'love' in out
39+
assert 'the' in out
4040

4141

4242
def test_query_struct_params(capsys):
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
google-cloud-bigquery==0.24.0
1+
google-cloud-bigquery==0.25.0
22
google-auth-oauthlib==0.1.0
33
pytz==2017.2
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Gandalf, 2000, 140.0, 1
1+
Gandalf,2000,140.0,1

bigquery/cloud-client/simple_app.py

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,10 @@ def query_shakespeare():
3838
# [END run_query]
3939

4040
# [START print_results]
41-
# Drain the query results by requesting a page at a time.
42-
page_token = None
41+
rows = query_results.fetch_data(max_results=10)
4342

44-
while True:
45-
rows, total_rows, page_token = query_results.fetch_data(
46-
max_results=10,
47-
page_token=page_token)
48-
49-
for row in rows:
50-
print(row)
51-
52-
if not page_token:
53-
break
43+
for row in rows:
44+
print(row)
5445
# [END print_results]
5546

5647

bigquery/cloud-client/sync_query.py

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,10 @@ def sync_query(query):
3939

4040
query_results.run()
4141

42-
# Drain the query results by requesting a page at a time.
43-
page_token = None
42+
rows = query_results.fetch_data(max_results=10)
4443

45-
while True:
46-
rows, total_rows, page_token = query_results.fetch_data(
47-
max_results=10,
48-
page_token=page_token)
49-
50-
for row in rows:
51-
print(row)
52-
53-
if not page_token:
54-
break
44+
for row in rows:
45+
print(row)
5546
# [END sync_query]
5647

5748

bigquery/cloud-client/user_credentials.py

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,20 +46,11 @@ def run_query(credentials, project, query):
4646

4747
wait_for_job(query_job)
4848

49-
# Drain the query results by requesting a page at a time.
5049
query_results = query_job.results()
51-
page_token = None
50+
rows = query_results.fetch_data(max_results=10)
5251

53-
while True:
54-
rows, total_rows, page_token = query_results.fetch_data(
55-
max_results=10,
56-
page_token=page_token)
57-
58-
for row in rows:
59-
print(row)
60-
61-
if not page_token:
62-
break
52+
for row in rows:
53+
print(row)
6354

6455

6556
def authenticate_and_query(project, query, launch_browser=True):

bigquery/dml/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
flake8==3.3.0
2-
google-cloud-bigquery==0.24.0
2+
google-cloud-bigquery==0.25.0
33
PyMySQL==0.7.11
44
six==1.10.0
55
SQLAlchemy==1.1.11

bigtable/autoscaler/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
google-cloud-bigtable==0.24.0
2-
google-cloud-monitoring==0.24.0
2+
google-cloud-monitoring==0.25.0

bigtable/hello/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
google-cloud-bigtable==0.24.0
2-
google-cloud-core==0.24.1
2+
google-cloud-core==0.25.0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
google-cloud-happybase==0.24.0
2-
google-cloud-core==0.24.1
2+
google-cloud-core==0.25.0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
google-cloud-datastore==1.0.0
1+
google-cloud-datastore==1.1.0
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Flask==0.12.2
22
gunicorn==19.7.1
3-
google-cloud-vision==0.24.0
4-
google-cloud-storage==1.1.1
5-
google-cloud-datastore==1.0.0
3+
google-cloud-vision==0.25.0
4+
google-cloud-storage==1.2.0
5+
google-cloud-datastore==1.1.0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
google-cloud-datastore==1.0.0
1+
google-cloud-datastore==1.1.0

dns/api/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
google-cloud-dns==0.24.0
1+
google-cloud-dns==0.25.0

endpoints/getting-started/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ gunicorn==19.7.1
44
six==1.10.0
55
pyyaml==3.12
66
requests==2.18.1
7-
google-auth==1.0.0
7+
google-auth==1.0.1
88
google-auth-oauthlib==0.1.0

error_reporting/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
google-cloud-error-reporting==0.24.2
1+
google-cloud-error-reporting==0.25.0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
google-cloud-pubsub==0.25.0
1+
google-cloud-pubsub==0.26.0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
google-cloud-language==0.24.1
1+
google-cloud-language==0.25.0

language/cloud-client/v1/snippets.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def syntax_text(text):
120120
tokens = document.analyze_syntax().tokens
121121

122122
for token in tokens:
123-
print(u'{}: {}'.format(token.part_of_speech, token.text_content))
123+
print(u'{}: {}'.format(token.part_of_speech.tag, token.text_content))
124124

125125

126126
def syntax_file(gcs_uri):
@@ -135,7 +135,7 @@ def syntax_file(gcs_uri):
135135
tokens = document.analyze_syntax().tokens
136136

137137
for token in tokens:
138-
print(u'{}: {}'.format(token.part_of_speech, token.text_content))
138+
print(u'{}: {}'.format(token.part_of_speech.tag, token.text_content))
139139

140140

141141
if __name__ == '__main__':
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
gapic-google-cloud-language-v1beta2==0.15.3
2-
google-cloud-language==0.24.1
2+
google-cloud-language==0.25.0

language/cloud-client/v1beta2/snippets.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def syntax_text(text):
124124
tokens = document.analyze_syntax().tokens
125125

126126
for token in tokens:
127-
print(u'{}: {}'.format(token.part_of_speech, token.text_content))
127+
print(u'{}: {}'.format(token.part_of_speech.tag, token.text_content))
128128

129129

130130
def syntax_file(gcs_uri):
@@ -139,7 +139,7 @@ def syntax_file(gcs_uri):
139139
tokens = document.analyze_syntax().tokens
140140

141141
for token in tokens:
142-
print(u'{}: {}'.format(token.part_of_speech, token.text_content))
142+
print(u'{}: {}'.format(token.part_of_speech.tag, token.text_content))
143143

144144

145145
def entity_sentiment_text(text):

language/sentiment/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
google-cloud-language==0.24.1
1+
google-cloud-language==0.25.0

logging/cloud-client/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
google-cloud-logging==1.0.0
1+
google-cloud-logging==1.1.0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
google-cloud-monitoring==0.24.0
1+
google-cloud-monitoring==0.25.0

pubsub/cloud-client/iam.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def set_topic_policy(topic_name):
7070
policy['roles/pubsub.viewer'] = [policy.all_users()]
7171
# Add a group as publisherss.
7272
publishers = policy.get('roles/pubsub.publisher', [])
73-
publishers.append(policy.group('[email protected]'))
73+
publishers.add(policy.group('[email protected]'))
7474
policy['roles/pubsub.publisher'] = publishers
7575

7676
# Set the policy
@@ -90,7 +90,7 @@ def set_subscription_policy(topic_name, subscription_name):
9090
policy['roles/viewer'] = [policy.all_users()]
9191
# # Add a group as editors.
9292
editors = policy.get('roles/editor', [])
93-
editors.append(policy.group('[email protected]'))
93+
editors.add(policy.group('[email protected]'))
9494
policy['roles/editor'] = editors
9595

9696
# Set the policy

pubsub/cloud-client/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
google-cloud-pubsub==0.25.0
1+
google-cloud-pubsub==0.26.0

spanner/cloud-client/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
google-cloud-spanner==0.24.2
1+
google-cloud-spanner==0.25.0

speech/cloud-client/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
google-cloud-speech==0.25.1
1+
google-cloud-speech==0.26.0

storage/cloud-client/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
google-cloud-storage==1.1.1
2-
google-cloud-pubsub==0.25.0
1+
google-cloud-storage==1.2.0
2+
google-cloud-pubsub==0.26.0

testing/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ responses==0.5.1
1313
WebTest==2.0.27
1414
webapp2==2.5.2
1515
google-api-python-client==1.6.2
16-
google-cloud-core==0.24.1
16+
google-cloud-core==0.25.0
1717
gcp-devrel-py-tools==0.0.10
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
google-cloud-translate==0.24.0
1+
google-cloud-translate==0.25.0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
google-cloud-vision==0.24.0
1+
google-cloud-vision==0.25.0
22
pillow==4.1.1
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
google-cloud-vision==0.24.0
1+
google-cloud-vision==0.25.0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
google-cloud-vision==0.24.0
1+
google-cloud-vision==0.25.0
22
pillow==4.1.1
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
google-cloud-vision==0.24.0
1+
google-cloud-vision==0.25.0
22
Pillow==4.1.1
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
google-cloud-vision==0.24.0
1+
google-cloud-vision==0.25.0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
google-cloud-vision==0.24.0
1+
google-cloud-vision==0.25.0

0 commit comments

Comments
 (0)