diff --git a/appengine/flexible/datastore/main.py b/appengine/flexible/datastore/main.py index 5182f620dd08..a6e001010bc3 100644 --- a/appengine/flexible/datastore/main.py +++ b/appengine/flexible/datastore/main.py @@ -18,7 +18,7 @@ import socket from flask import Flask, request -from gcloud import datastore +from google.cloud import datastore app = Flask(__name__) diff --git a/appengine/flexible/datastore/requirements.txt b/appengine/flexible/datastore/requirements.txt index 2f8ee232f36d..c18997ae6e9f 100644 --- a/appengine/flexible/datastore/requirements.txt +++ b/appengine/flexible/datastore/requirements.txt @@ -1,4 +1,4 @@ Flask==0.11.1 -gcloud==0.18.3 +google-cloud-datastore==0.20.0 gunicorn==19.6.0 oauth2client==3.0.0 diff --git a/appengine/flexible/django_cloudsql/requirements.txt b/appengine/flexible/django_cloudsql/requirements.txt index e421bda2ed6b..13bbb36c1da7 100644 --- a/appengine/flexible/django_cloudsql/requirements.txt +++ b/appengine/flexible/django_cloudsql/requirements.txt @@ -1,4 +1,4 @@ Django==1.10.1 -mysqlclient==1.3.7 +mysqlclient==1.3.8 wheel==0.30.0a0 gunicorn==19.6.0 diff --git a/appengine/flexible/endpoints/requirements.txt b/appengine/flexible/endpoints/requirements.txt index 847a65872d58..45699fbc037f 100644 --- a/appengine/flexible/endpoints/requirements.txt +++ b/appengine/flexible/endpoints/requirements.txt @@ -1,8 +1,6 @@ Flask==0.11.1 flask-cors==3.0.2 gunicorn==19.6.0 -gcloud==0.18.3 six==1.10.0 pyyaml==3.12 requests==2.11.1 -google-api-python-client==1.5.3 diff --git a/appengine/flexible/pubsub/main.py b/appengine/flexible/pubsub/main.py index f7e7eb42adca..433a9d4aaee8 100644 --- a/appengine/flexible/pubsub/main.py +++ b/appengine/flexible/pubsub/main.py @@ -19,7 +19,7 @@ import os from flask import current_app, Flask, render_template, request -from gcloud import pubsub +from google.cloud import pubsub app = Flask(__name__) diff --git a/appengine/flexible/pubsub/requirements.txt b/appengine/flexible/pubsub/requirements.txt index 2f8ee232f36d..03f059f538de 100644 --- a/appengine/flexible/pubsub/requirements.txt +++ b/appengine/flexible/pubsub/requirements.txt @@ -1,4 +1,4 @@ Flask==0.11.1 -gcloud==0.18.3 +google-cloud-pubsub==0.20.0 gunicorn==19.6.0 oauth2client==3.0.0 diff --git a/appengine/flexible/storage/main.py b/appengine/flexible/storage/main.py index 096fbfed9707..b5834362600c 100644 --- a/appengine/flexible/storage/main.py +++ b/appengine/flexible/storage/main.py @@ -17,7 +17,7 @@ import os from flask import Flask, request -from gcloud import storage +from google.cloud import storage # [start config] app = Flask(__name__) diff --git a/appengine/flexible/storage/requirements.txt b/appengine/flexible/storage/requirements.txt index 1f5638e3eb84..a0ffd863192c 100644 --- a/appengine/flexible/storage/requirements.txt +++ b/appengine/flexible/storage/requirements.txt @@ -1,3 +1,3 @@ Flask==0.11.1 -gcloud==0.18.3 +google-cloud-storage==0.20.0 gunicorn==19.6.0 diff --git a/bigquery/cloud-client/async_query.py b/bigquery/cloud-client/async_query.py index 0ca324240893..37192d156599 100755 --- a/bigquery/cloud-client/async_query.py +++ b/bigquery/cloud-client/async_query.py @@ -27,7 +27,7 @@ import time import uuid -from gcloud import bigquery +from google.cloud import bigquery def async_query(query): diff --git a/bigquery/cloud-client/export_data_to_gcs.py b/bigquery/cloud-client/export_data_to_gcs.py index c9771ea1b0d5..e9037ee01580 100644 --- a/bigquery/cloud-client/export_data_to_gcs.py +++ b/bigquery/cloud-client/export_data_to_gcs.py @@ -29,7 +29,7 @@ import time import uuid -from gcloud import bigquery +from google.cloud import bigquery def export_data_to_gcs(dataset_name, table_name, destination): diff --git a/bigquery/cloud-client/load_data_from_file.py b/bigquery/cloud-client/load_data_from_file.py index cbb015347352..b4f851f1adeb 100644 --- a/bigquery/cloud-client/load_data_from_file.py +++ b/bigquery/cloud-client/load_data_from_file.py @@ -27,7 +27,7 @@ import argparse import time -from gcloud import bigquery +from google.cloud import bigquery def load_data_from_file(dataset_name, table_name, source_file_name): diff --git a/bigquery/cloud-client/load_data_from_gcs.py b/bigquery/cloud-client/load_data_from_gcs.py index 1a577be649ca..4aa435fad007 100644 --- a/bigquery/cloud-client/load_data_from_gcs.py +++ b/bigquery/cloud-client/load_data_from_gcs.py @@ -29,7 +29,7 @@ import time import uuid -from gcloud import bigquery +from google.cloud import bigquery def load_data_from_gcs(dataset_name, table_name, source): diff --git a/bigquery/cloud-client/requirements.txt b/bigquery/cloud-client/requirements.txt index 97a207d3aad0..11a303264935 100644 --- a/bigquery/cloud-client/requirements.txt +++ b/bigquery/cloud-client/requirements.txt @@ -1 +1 @@ -gcloud==0.18.3 +google-cloud-bigquery==0.20.0 diff --git a/bigquery/cloud-client/snippets.py b/bigquery/cloud-client/snippets.py index d201a84cba80..0e1f5d4b5a87 100644 --- a/bigquery/cloud-client/snippets.py +++ b/bigquery/cloud-client/snippets.py @@ -28,8 +28,8 @@ import time import uuid -from gcloud import bigquery -import gcloud.bigquery.job +from google.cloud import bigquery +import google.cloud.bigquery.job def list_projects(): @@ -145,7 +145,7 @@ def list_rows(dataset_name, table_name, project=None): break # Use format to create a simple table. - format_string = '{:<16} ' * len(table.schema) + format_string = '{!s:<16} ' * len(table.schema) # Print schema field names field_names = [field.name for field in table.schema] @@ -177,7 +177,7 @@ def copy_table(dataset_name, table_name, new_table_name, project=None): # Create the table if it doesn't exist. job.create_disposition = ( - gcloud.bigquery.job.CreateDisposition.CREATE_IF_NEEDED) + google.cloud.bigquery.job.CreateDisposition.CREATE_IF_NEEDED) # Start the job. job.begin() diff --git a/bigquery/cloud-client/snippets_test.py b/bigquery/cloud-client/snippets_test.py index 372cbc834bf6..35f79af7b57b 100644 --- a/bigquery/cloud-client/snippets_test.py +++ b/bigquery/cloud-client/snippets_test.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from gcloud import bigquery +from google.cloud import bigquery import pytest import snippets diff --git a/bigquery/cloud-client/stream_data.py b/bigquery/cloud-client/stream_data.py index 5df6be114446..a90d432bf3e4 100644 --- a/bigquery/cloud-client/stream_data.py +++ b/bigquery/cloud-client/stream_data.py @@ -29,7 +29,7 @@ import json from pprint import pprint -from gcloud import bigquery +from google.cloud import bigquery def stream_data(dataset_name, table_name, json_data): diff --git a/bigquery/cloud-client/sync_query.py b/bigquery/cloud-client/sync_query.py index 59007b537833..f21270ed0706 100755 --- a/bigquery/cloud-client/sync_query.py +++ b/bigquery/cloud-client/sync_query.py @@ -26,7 +26,7 @@ import argparse # [START sync_query] -from gcloud import bigquery +from google.cloud import bigquery def sync_query(query): diff --git a/bigquery/dml/insert_sql.py b/bigquery/dml/insert_sql.py index b79699e9ccf6..e006da4aa4ba 100644 --- a/bigquery/dml/insert_sql.py +++ b/bigquery/dml/insert_sql.py @@ -33,7 +33,7 @@ # [START insert_sql] import argparse -from gcloud import bigquery +from google.cloud import bigquery def insert_sql(project, default_dataset, sql_path): diff --git a/bigquery/dml/requirements.txt b/bigquery/dml/requirements.txt index 03a56ae32414..939b3c048118 100644 --- a/bigquery/dml/requirements.txt +++ b/bigquery/dml/requirements.txt @@ -1,5 +1,5 @@ flake8==3.0.4 -gcloud==0.18.3 +google-cloud-bigquery==0.20.0 PyMySQL==0.7.9 six==1.10.0 SQLAlchemy==1.1.0b3 diff --git a/bigtable/hello/main.py b/bigtable/hello/main.py index 949c6baffbf5..bd440802003a 100644 --- a/bigtable/hello/main.py +++ b/bigtable/hello/main.py @@ -26,79 +26,79 @@ import argparse -from gcloud import bigtable +from google.cloud import bigtable def main(project_id, instance_id, table_id): # [START connecting_to_bigtable] # The client must be created with admin=True because it will create a # table. - with bigtable.Client(project=project_id, admin=True) as client: - instance = client.instance(instance_id) - # [END connecting_to_bigtable] - - # [START creating_a_table] - print('Creating the {} table.'.format(table_id)) - table = instance.table(table_id) - table.create() - column_family_id = 'cf1' - cf1 = table.column_family(column_family_id) - cf1.create() - # [END creating_a_table] - - # [START writing_rows] - print('Writing some greetings to the table.') - column_id = 'greeting'.encode('utf-8') - greetings = [ - 'Hello World!', - 'Hello Cloud Bigtable!', - 'Hello Python!', - ] - - for i, value in enumerate(greetings): - # Note: This example uses sequential numeric IDs for simplicity, - # but this can result in poor performance in a production - # application. Since rows are stored in sorted order by key, - # sequential keys can result in poor distribution of operations - # across nodes. - # - # For more information about how to design a Bigtable schema for - # the best performance, see the documentation: - # - # https://cloud.google.com/bigtable/docs/schema-design - row_key = 'greeting{}'.format(i) - row = table.row(row_key) - row.set_cell( - column_family_id, - column_id, - value.encode('utf-8')) - row.commit() - # [END writing_rows] - - # [START getting_a_row] - print('Getting a single greeting by row key.') - key = 'greeting0' - row = table.read_row(key.encode('utf-8')) - value = row.cells[column_family_id][column_id][0].value - print('\t{}: {}'.format(key, value.decode('utf-8'))) - # [END getting_a_row] - - # [START scanning_all_rows] - print('Scanning for all greetings:') - partial_rows = table.read_rows() - partial_rows.consume_all() - - for row_key, row in partial_rows.rows.items(): - key = row_key.decode('utf-8') - cell = row.cells[column_family_id][column_id][0] - value = cell.value.decode('utf-8') - print('\t{}: {}'.format(key, value)) - # [END scanning_all_rows] - - # [START deleting_a_table] - print('Deleting the {} table.'.format(table_id)) - table.delete() - # [END deleting_a_table] + client = bigtable.Client(project=project_id, admin=True) + instance = client.instance(instance_id) + # [END connecting_to_bigtable] + + # [START creating_a_table] + print('Creating the {} table.'.format(table_id)) + table = instance.table(table_id) + table.create() + column_family_id = 'cf1' + cf1 = table.column_family(column_family_id) + cf1.create() + # [END creating_a_table] + + # [START writing_rows] + print('Writing some greetings to the table.') + column_id = 'greeting'.encode('utf-8') + greetings = [ + 'Hello World!', + 'Hello Cloud Bigtable!', + 'Hello Python!', + ] + + for i, value in enumerate(greetings): + # Note: This example uses sequential numeric IDs for simplicity, + # but this can result in poor performance in a production + # application. Since rows are stored in sorted order by key, + # sequential keys can result in poor distribution of operations + # across nodes. + # + # For more information about how to design a Bigtable schema for + # the best performance, see the documentation: + # + # https://cloud.google.com/bigtable/docs/schema-design + row_key = 'greeting{}'.format(i) + row = table.row(row_key) + row.set_cell( + column_family_id, + column_id, + value.encode('utf-8')) + row.commit() + # [END writing_rows] + + # [START getting_a_row] + print('Getting a single greeting by row key.') + key = 'greeting0' + row = table.read_row(key.encode('utf-8')) + value = row.cells[column_family_id][column_id][0].value + print('\t{}: {}'.format(key, value.decode('utf-8'))) + # [END getting_a_row] + + # [START scanning_all_rows] + print('Scanning for all greetings:') + partial_rows = table.read_rows() + partial_rows.consume_all() + + for row_key, row in partial_rows.rows.items(): + key = row_key.decode('utf-8') + cell = row.cells[column_family_id][column_id][0] + value = cell.value.decode('utf-8') + print('\t{}: {}'.format(key, value)) + # [END scanning_all_rows] + + # [START deleting_a_table] + print('Deleting the {} table.'.format(table_id)) + table.delete() + # [END deleting_a_table] if __name__ == '__main__': diff --git a/bigtable/hello/requirements.txt b/bigtable/hello/requirements.txt index a14adce81e68..faf739f846d1 100644 --- a/bigtable/hello/requirements.txt +++ b/bigtable/hello/requirements.txt @@ -1 +1 @@ -gcloud[grpc]==0.18.3 +google-cloud-bigtable==0.20.0 diff --git a/bigtable/hello_happybase/main.py b/bigtable/hello_happybase/main.py index 519eedc0676e..0668402f895c 100644 --- a/bigtable/hello_happybase/main.py +++ b/bigtable/hello_happybase/main.py @@ -26,8 +26,8 @@ import argparse -from gcloud import bigtable -from gcloud.bigtable import happybase +from google.cloud import bigtable +from google.cloud import happybase def main(project_id, instance_id, table_name): diff --git a/bigtable/hello_happybase/requirements.txt b/bigtable/hello_happybase/requirements.txt index a14adce81e68..ececa7ae5e1c 100644 --- a/bigtable/hello_happybase/requirements.txt +++ b/bigtable/hello_happybase/requirements.txt @@ -1 +1 @@ -gcloud[grpc]==0.18.3 +google-cloud-happybase==0.20.0 diff --git a/blog/introduction_to_data_models_in_cloud_datastore/blog.py b/blog/introduction_to_data_models_in_cloud_datastore/blog.py index f3b0d54c0b84..bb64ebbd0ebd 100644 --- a/blog/introduction_to_data_models_in_cloud_datastore/blog.py +++ b/blog/introduction_to_data_models_in_cloud_datastore/blog.py @@ -14,7 +14,7 @@ import argparse import datetime -from gcloud import datastore +from google.cloud import datastore def path_to_key(datastore, path): diff --git a/blog/introduction_to_data_models_in_cloud_datastore/requirements.txt b/blog/introduction_to_data_models_in_cloud_datastore/requirements.txt index 97a207d3aad0..d0ffdbaabbf3 100644 --- a/blog/introduction_to_data_models_in_cloud_datastore/requirements.txt +++ b/blog/introduction_to_data_models_in_cloud_datastore/requirements.txt @@ -1 +1 @@ -gcloud==0.18.3 +google-cloud-datastore==0.20.0 diff --git a/blog/introduction_to_data_models_in_cloud_datastore/wiki.py b/blog/introduction_to_data_models_in_cloud_datastore/wiki.py index 28f12e4a3525..160b58d16a8e 100644 --- a/blog/introduction_to_data_models_in_cloud_datastore/wiki.py +++ b/blog/introduction_to_data_models_in_cloud_datastore/wiki.py @@ -14,7 +14,7 @@ import argparse import datetime -from gcloud import datastore +from google.cloud import datastore def path_to_key(datastore, path): diff --git a/container_engine/django_tutorial/requirements.txt b/container_engine/django_tutorial/requirements.txt index e421bda2ed6b..13bbb36c1da7 100644 --- a/container_engine/django_tutorial/requirements.txt +++ b/container_engine/django_tutorial/requirements.txt @@ -1,4 +1,4 @@ Django==1.10.1 -mysqlclient==1.3.7 +mysqlclient==1.3.8 wheel==0.30.0a0 gunicorn==19.6.0 diff --git a/dataproc/create_cluster_and_submit_job.py b/dataproc/create_cluster_and_submit_job.py index 9275f1f9e8ed..426a73e5c782 100644 --- a/dataproc/create_cluster_and_submit_job.py +++ b/dataproc/create_cluster_and_submit_job.py @@ -17,7 +17,7 @@ import os from apiclient import discovery -from gcloud import storage +from google.cloud import storage from oauth2client.client import GoogleCredentials # Currently only the "global" region is supported diff --git a/dataproc/requirements.txt b/dataproc/requirements.txt index 8d2c52acc2e3..87da68827aff 100644 --- a/dataproc/requirements.txt +++ b/dataproc/requirements.txt @@ -1,2 +1,2 @@ google-api-python-client==1.5.3 -gcloud==0.18.3 +google-cloud==0.20.0 diff --git a/datastore/api/requirements.txt b/datastore/api/requirements.txt index 97a207d3aad0..d0ffdbaabbf3 100644 --- a/datastore/api/requirements.txt +++ b/datastore/api/requirements.txt @@ -1 +1 @@ -gcloud==0.18.3 +google-cloud-datastore==0.20.0 diff --git a/datastore/api/snippets.py b/datastore/api/snippets.py index 2552ba5a7f95..22d5e35e526d 100644 --- a/datastore/api/snippets.py +++ b/datastore/api/snippets.py @@ -16,8 +16,8 @@ import datetime from pprint import pprint -import gcloud -from gcloud import datastore +from google.cloud import datastore +import google.cloud.exceptions def incomplete_key(client): @@ -539,7 +539,7 @@ def inequality_invalid(client): return list(query.fetch()) - except gcloud.exceptions.BadRequest: + except google.cloud.exceptions.BadRequest: pass @@ -579,7 +579,7 @@ def inequality_sort_invalid_not_same(client): return list(query.fetch()) - except gcloud.exceptions.BadRequest: + except google.cloud.exceptions.BadRequest: pass @@ -593,7 +593,7 @@ def inequality_sort_invalid_not_first(client): return list(query.fetch()) - except gcloud.exceptions.BadRequest: + except google.cloud.exceptions.BadRequest: pass @@ -661,7 +661,7 @@ def transfer_funds(client, from_key, to_key, amount): for _ in range(5): try: transfer_funds(client, account1.key, account2.key, 50) - except gcloud.exceptions.Conflict: + except google.cloud.exceptions.Conflict: continue # [END transactional_retry] @@ -787,7 +787,7 @@ def property_by_kind_run_query(client): def eventual_consistent_query(client): # [START eventual_consistent_query] - # Read consistency cannot be specified in gcloud-python. + # Read consistency cannot be specified in google-cloud-python. # [END eventual_consistent_query] pass diff --git a/datastore/api/snippets_test.py b/datastore/api/snippets_test.py index 8afb05d79ec1..5730053ce95d 100644 --- a/datastore/api/snippets_test.py +++ b/datastore/api/snippets_test.py @@ -11,9 +11,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -from gcloud import datastore from gcp.testing import eventually_consistent from gcp.testing.flaky import flaky +from google.cloud import datastore import pytest import snippets diff --git a/datastore/api/tasks.py b/datastore/api/tasks.py index 72d8fc2bf3b1..bdd97780721c 100644 --- a/datastore/api/tasks.py +++ b/datastore/api/tasks.py @@ -15,7 +15,7 @@ import datetime # [START build_service] -from gcloud import datastore +from google.cloud import datastore def create_client(project_id): diff --git a/datastore/api/tasks_test.py b/datastore/api/tasks_test.py index 33104518a399..2f4cbf02e594 100644 --- a/datastore/api/tasks_test.py +++ b/datastore/api/tasks_test.py @@ -11,9 +11,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -from gcloud import datastore from gcp.testing import eventually_consistent from gcp.testing.flaky import flaky +from google.cloud import datastore import pytest import tasks diff --git a/dns/api/main.py b/dns/api/main.py index 26528efbc497..2ed3d61d7c37 100644 --- a/dns/api/main.py +++ b/dns/api/main.py @@ -13,8 +13,8 @@ import argparse -from gcloud import dns -from gcloud.exceptions import NotFound +from google.cloud import dns +from google.cloud.exceptions import NotFound # [START create_zone] diff --git a/dns/api/main_test.py b/dns/api/main_test.py index 91282ad60e9f..21b02ae2e271 100644 --- a/dns/api/main_test.py +++ b/dns/api/main_test.py @@ -11,8 +11,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -from gcloud import dns from gcp.testing.flaky import flaky +from google.cloud import dns import pytest import main diff --git a/dns/api/requirements.txt b/dns/api/requirements.txt index 97a207d3aad0..ed5da71cc167 100644 --- a/dns/api/requirements.txt +++ b/dns/api/requirements.txt @@ -1 +1 @@ -gcloud==0.18.3 +google-cloud-dns==0.20.0 diff --git a/logging/cloud-client/export.py b/logging/cloud-client/export.py index b24dd9878da7..20367c274b21 100644 --- a/logging/cloud-client/export.py +++ b/logging/cloud-client/export.py @@ -16,7 +16,7 @@ import argparse -from gcloud import logging +from google.cloud import logging def list_sinks(): diff --git a/logging/cloud-client/export_test.py b/logging/cloud-client/export_test.py index d4dfd681ea31..8f1c299d7e76 100644 --- a/logging/cloud-client/export_test.py +++ b/logging/cloud-client/export_test.py @@ -15,8 +15,8 @@ import random import string -from gcloud import logging from gcp.testing import eventually_consistent +from google.cloud import logging import pytest import export diff --git a/logging/cloud-client/requirements.txt b/logging/cloud-client/requirements.txt index 97a207d3aad0..303f67c091c9 100644 --- a/logging/cloud-client/requirements.txt +++ b/logging/cloud-client/requirements.txt @@ -1 +1 @@ -gcloud==0.18.3 +google-cloud-logging==0.20.0 diff --git a/logging/cloud-client/snippets.py b/logging/cloud-client/snippets.py index f73143ec8bc2..0280cfbe4063 100644 --- a/logging/cloud-client/snippets.py +++ b/logging/cloud-client/snippets.py @@ -23,7 +23,7 @@ import argparse -from gcloud import logging +from google.cloud import logging def write_entry(logger_name): diff --git a/logging/cloud-client/snippets_test.py b/logging/cloud-client/snippets_test.py index f41f52fb5575..86eac1180a04 100644 --- a/logging/cloud-client/snippets_test.py +++ b/logging/cloud-client/snippets_test.py @@ -12,8 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -from gcloud import logging from gcp.testing import eventually_consistent +from google.cloud import logging import pytest import snippets diff --git a/pubsub/cloud-client/iam.py b/pubsub/cloud-client/iam.py index 3828195bce00..1f97e4570e7a 100644 --- a/pubsub/cloud-client/iam.py +++ b/pubsub/cloud-client/iam.py @@ -23,7 +23,7 @@ import argparse -from gcloud import pubsub +from google.cloud import pubsub def get_topic_policy(topic_name): diff --git a/pubsub/cloud-client/iam_test.py b/pubsub/cloud-client/iam_test.py index 0e662fcb526c..7adf87056e6d 100644 --- a/pubsub/cloud-client/iam_test.py +++ b/pubsub/cloud-client/iam_test.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from gcloud import pubsub +from google.cloud import pubsub import pytest import iam diff --git a/pubsub/cloud-client/publisher.py b/pubsub/cloud-client/publisher.py index 61387d67ee1c..d527b54cb1c4 100644 --- a/pubsub/cloud-client/publisher.py +++ b/pubsub/cloud-client/publisher.py @@ -23,7 +23,7 @@ import argparse -from gcloud import pubsub +from google.cloud import pubsub def list_topics(): diff --git a/pubsub/cloud-client/publisher_test.py b/pubsub/cloud-client/publisher_test.py index 3cce3c962005..6c0a9be004df 100644 --- a/pubsub/cloud-client/publisher_test.py +++ b/pubsub/cloud-client/publisher_test.py @@ -12,8 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -from gcloud import pubsub from gcp.testing import eventually_consistent +from google.cloud import pubsub import pytest import publisher diff --git a/pubsub/cloud-client/requirements.txt b/pubsub/cloud-client/requirements.txt index 97a207d3aad0..7aa8ce1fbd11 100644 --- a/pubsub/cloud-client/requirements.txt +++ b/pubsub/cloud-client/requirements.txt @@ -1 +1 @@ -gcloud==0.18.3 +google-cloud-pubsub==0.20.0 diff --git a/pubsub/cloud-client/subscriber.py b/pubsub/cloud-client/subscriber.py index 2b3371cd6165..b4fdd95738d1 100644 --- a/pubsub/cloud-client/subscriber.py +++ b/pubsub/cloud-client/subscriber.py @@ -23,7 +23,7 @@ import argparse -from gcloud import pubsub +from google.cloud import pubsub def list_subscriptions(topic_name): diff --git a/pubsub/cloud-client/subscriber_test.py b/pubsub/cloud-client/subscriber_test.py index 6335aa9733cd..3b51d48afb8c 100644 --- a/pubsub/cloud-client/subscriber_test.py +++ b/pubsub/cloud-client/subscriber_test.py @@ -12,8 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -from gcloud import pubsub from gcp.testing import eventually_consistent +from google.cloud import pubsub import pytest import subscriber diff --git a/requirements-dev.in b/requirements-dev.in index 2a9209ba5b0d..7ff2a85b3cd7 100644 --- a/requirements-dev.in +++ b/requirements-dev.in @@ -6,7 +6,7 @@ mock==2.0.0 mysql-python==1.2.5 PyCrypto==2.6.1 pytest-cov==2.3.1 -pytest==3.0.2 +pytest==3.0.3 pyyaml==3.12 responses==0.5.1 WebTest==2.0.23 diff --git a/requirements-dev.txt b/requirements-dev.txt index 80dc4684a600..7cc6480bcc61 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -11,9 +11,17 @@ Flask-SQLAlchemy==2.1 Flask==0.11.1 fluent-logger==0.4.4 funcsigs==1.0.2 -gcloud==0.18.3 -gcloud[grpc]==0.18.3 google-api-python-client==1.5.3 +google-cloud-bigquery==0.20.0 +google-cloud-bigtable==0.20.0 +google-cloud-core==0.20.0 +google-cloud-datastore==0.20.0 +google-cloud-dns==0.20.0 +google-cloud-happybase==0.20.0 +google-cloud-logging==0.20.0 +google-cloud-pubsub==0.20.0 +google-cloud-storage==0.20.0 +google-cloud==0.20.0 grpc-google-cloud-speech-v1beta1==1.0.1 grpcio==1.0.0 gunicorn==19.6.0 @@ -22,7 +30,7 @@ kinto==4.2.0 mailjet-rest==v1.2.2 mock==2.0.0 mysql-python==1.2.5; python_version == '2.7' -mysqlclient==1.3.7 +mysqlclient==1.3.8 numpy==1.11.2rc1 oauth2client==3.0.0 Pillow==3.3.1 @@ -34,7 +42,7 @@ pyjwt==1.4.2 pymemcache==1.3.6 PyMySQL==0.7.9 pytest-cov==2.3.1 -pytest==3.0.2 +pytest==3.0.3 pyyaml==3.12 redis==2.10.5 requests-toolbelt==0.7.0 diff --git a/speech/grpc/requirements.txt b/speech/grpc/requirements.txt index cc9e74dfbff3..9d82c755b001 100644 --- a/speech/grpc/requirements.txt +++ b/speech/grpc/requirements.txt @@ -1,4 +1,4 @@ -gcloud==0.18.3 +google-cloud-core==0.20.0 grpcio==1.0.0 PyAudio==0.2.9 grpc-google-cloud-speech-v1beta1==1.0.1 diff --git a/speech/grpc/transcribe.py b/speech/grpc/transcribe.py index 0bbb098710d0..c0800defad16 100644 --- a/speech/grpc/transcribe.py +++ b/speech/grpc/transcribe.py @@ -17,7 +17,7 @@ import argparse -from gcloud.credentials import get_credentials +from google.cloud.credentials import get_credentials from google.cloud.speech.v1beta1 import cloud_speech_pb2 as cloud_speech from grpc.beta import implementations diff --git a/speech/grpc/transcribe_async.py b/speech/grpc/transcribe_async.py index 5b9d323d5af8..86ce8f9ba719 100644 --- a/speech/grpc/transcribe_async.py +++ b/speech/grpc/transcribe_async.py @@ -19,7 +19,7 @@ import argparse import time -from gcloud.credentials import get_credentials +from google.cloud.credentials import get_credentials from google.cloud.speech.v1beta1 import cloud_speech_pb2 from google.longrunning import operations_grpc_pb2 from grpc.beta import implementations diff --git a/speech/grpc/transcribe_streaming.py b/speech/grpc/transcribe_streaming.py index b1c2e63bae54..c944767ace66 100644 --- a/speech/grpc/transcribe_streaming.py +++ b/speech/grpc/transcribe_streaming.py @@ -21,7 +21,7 @@ import signal import threading -from gcloud import credentials +from google.cloud import credentials from google.cloud.speech.v1beta1 import cloud_speech_pb2 as cloud_speech from google.rpc import code_pb2 from grpc.beta import implementations diff --git a/storage/cloud-client/acl.py b/storage/cloud-client/acl.py index 324f51b2dee0..d742ae428495 100644 --- a/storage/cloud-client/acl.py +++ b/storage/cloud-client/acl.py @@ -23,7 +23,7 @@ import argparse -from gcloud import storage +from google.cloud import storage def print_bucket_acl(bucket_name): diff --git a/storage/cloud-client/acl_test.py b/storage/cloud-client/acl_test.py index eca1570d8802..3197b4ea0f52 100644 --- a/storage/cloud-client/acl_test.py +++ b/storage/cloud-client/acl_test.py @@ -12,8 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -from gcloud import storage -import gcloud.storage.acl +from google.cloud import storage +import google.cloud.storage.acl import pytest import acl @@ -27,8 +27,8 @@ def test_bucket(cloud_config): """Yields a bucket that resets its acl after the test completes.""" bucket = storage.Client().bucket(cloud_config.storage_bucket) - acl = gcloud.storage.acl.BucketACL(bucket) - object_default_acl = gcloud.storage.acl.DefaultObjectACL(bucket) + acl = google.cloud.storage.acl.BucketACL(bucket) + object_default_acl = google.cloud.storage.acl.DefaultObjectACL(bucket) acl.reload() object_default_acl.reload() yield bucket @@ -42,7 +42,7 @@ def test_blob(cloud_config): bucket = storage.Client().bucket(cloud_config.storage_bucket) blob = bucket.blob('storage_acl_test_sigil') blob.upload_from_string('Hello, is it me you\'re looking for?') - acl = gcloud.storage.acl.ObjectACL(blob) + acl = google.cloud.storage.acl.ObjectACL(blob) acl.reload() yield blob acl.save() diff --git a/storage/cloud-client/encryption.py b/storage/cloud-client/encryption.py index 571b91b21203..d15be17c2af3 100644 --- a/storage/cloud-client/encryption.py +++ b/storage/cloud-client/encryption.py @@ -31,7 +31,7 @@ import base64 import os -from gcloud import storage +from google.cloud import storage def generate_encryption_key(): diff --git a/storage/cloud-client/encryption_test.py b/storage/cloud-client/encryption_test.py index 52d3e6d15d91..28fa5e3b8959 100644 --- a/storage/cloud-client/encryption_test.py +++ b/storage/cloud-client/encryption_test.py @@ -15,7 +15,7 @@ import base64 import tempfile -from gcloud import storage +from google.cloud import storage import pytest import encryption diff --git a/storage/cloud-client/requirements.txt b/storage/cloud-client/requirements.txt index 97a207d3aad0..303fed123d80 100644 --- a/storage/cloud-client/requirements.txt +++ b/storage/cloud-client/requirements.txt @@ -1 +1 @@ -gcloud==0.18.3 +google-cloud-storage==0.20.0 diff --git a/storage/cloud-client/snippets.py b/storage/cloud-client/snippets.py index 0f6b88cb3dea..c6c69d6ae664 100644 --- a/storage/cloud-client/snippets.py +++ b/storage/cloud-client/snippets.py @@ -24,7 +24,7 @@ import argparse import datetime -from gcloud import storage +from google.cloud import storage def create_bucket(bucket_name): diff --git a/storage/cloud-client/snippets_test.py b/storage/cloud-client/snippets_test.py index f215d2754870..a657894be304 100644 --- a/storage/cloud-client/snippets_test.py +++ b/storage/cloud-client/snippets_test.py @@ -14,8 +14,8 @@ import tempfile -import gcloud -from gcloud import storage +from google.cloud import storage +import google.cloud.exceptions import pytest import requests @@ -103,7 +103,7 @@ def test_rename_blob(test_blob, cloud_config): try: bucket.delete_blob('test_rename_blob') - except gcloud.exceptions.NotFound: + except google.cloud.exceptions.exceptions.NotFound: pass snippets.rename_blob(bucket.name, test_blob.name, 'test_rename_blob') @@ -117,7 +117,7 @@ def test_copy_blob(test_blob, cloud_config): try: bucket.delete_blob('test_copy_blob') - except gcloud.exceptions.NotFound: + except google.cloud.exceptions.NotFound: pass snippets.copy_blob(