- On January 1, 2020 this library will no longer support Python 2 on the latest released version. - Previously released library versions will continue to be available. For more information please + As of January 1, 2020 this library no longer supports Python 2 on the latest released version. + Library versions released prior to that date will continue to be available. For more information please visit Python 2 support on Google Cloud.
{% block body %} {% endblock %} diff --git a/docs/multiprocessing.rst b/docs/multiprocessing.rst deleted file mode 100644 index 1cb29d4ca..000000000 --- a/docs/multiprocessing.rst +++ /dev/null @@ -1,7 +0,0 @@ -.. note:: - - Because this client uses :mod:`grpcio` library, it is safe to - share instances across threads. In multiprocessing scenarios, the best - practice is to create client instances *after* the invocation of - :func:`os.fork` by :class:`multiprocessing.Pool` or - :class:`multiprocessing.Process`. diff --git a/google/cloud/bigquery_v2/proto/encryption_config_pb2.py b/google/cloud/bigquery_v2/proto/encryption_config_pb2.py index 5147743b6..5ae21ea6f 100644 --- a/google/cloud/bigquery_v2/proto/encryption_config_pb2.py +++ b/google/cloud/bigquery_v2/proto/encryption_config_pb2.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/bigquery_v2/proto/encryption_config.proto - +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection diff --git a/google/cloud/bigquery_v2/proto/encryption_config_pb2_grpc.py b/google/cloud/bigquery_v2/proto/encryption_config_pb2_grpc.py index 07cb78fe0..8a9393943 100644 --- a/google/cloud/bigquery_v2/proto/encryption_config_pb2_grpc.py +++ b/google/cloud/bigquery_v2/proto/encryption_config_pb2_grpc.py @@ -1,2 +1,3 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc diff --git a/google/cloud/bigquery_v2/proto/model_pb2.py b/google/cloud/bigquery_v2/proto/model_pb2.py index f485c4568..7b66be8f7 100644 --- a/google/cloud/bigquery_v2/proto/model_pb2.py +++ b/google/cloud/bigquery_v2/proto/model_pb2.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/bigquery_v2/proto/model.proto - +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection diff --git a/google/cloud/bigquery_v2/proto/model_pb2_grpc.py b/google/cloud/bigquery_v2/proto/model_pb2_grpc.py index 5abcdf0f2..13db95717 100644 --- a/google/cloud/bigquery_v2/proto/model_pb2_grpc.py +++ b/google/cloud/bigquery_v2/proto/model_pb2_grpc.py @@ -1,4 +1,5 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc from google.cloud.bigquery_v2.proto import ( @@ -8,15 +9,14 @@ class ModelServiceStub(object): - # missing associated documentation comment in .proto file - pass + """Missing associated documentation comment in .proto file.""" def __init__(self, channel): """Constructor. - Args: - channel: A grpc.Channel. - """ + Args: + channel: A grpc.Channel. + """ self.GetModel = channel.unary_unary( "/google.cloud.bigquery.v2.ModelService/GetModel", request_serializer=google_dot_cloud_dot_bigquery__v2_dot_proto_dot_model__pb2.GetModelRequest.SerializeToString, @@ -40,34 +40,33 @@ def __init__(self, channel): class ModelServiceServicer(object): - # missing associated documentation comment in .proto file - pass + """Missing associated documentation comment in .proto file.""" def GetModel(self, request, context): """Gets the specified model resource by model ID. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def ListModels(self, request, context): """Lists all models in the specified dataset. Requires the READER dataset - role. - """ + role. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def PatchModel(self, request, context): """Patch specific fields in the specified model. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def DeleteModel(self, request, context): """Deletes the model specified by modelId from the dataset. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -100,3 +99,116 @@ def add_ModelServiceServicer_to_server(servicer, server): "google.cloud.bigquery.v2.ModelService", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,)) + + +# This class is part of an EXPERIMENTAL API. +class ModelService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def GetModel( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.bigquery.v2.ModelService/GetModel", + google_dot_cloud_dot_bigquery__v2_dot_proto_dot_model__pb2.GetModelRequest.SerializeToString, + google_dot_cloud_dot_bigquery__v2_dot_proto_dot_model__pb2.Model.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def ListModels( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.bigquery.v2.ModelService/ListModels", + google_dot_cloud_dot_bigquery__v2_dot_proto_dot_model__pb2.ListModelsRequest.SerializeToString, + google_dot_cloud_dot_bigquery__v2_dot_proto_dot_model__pb2.ListModelsResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def PatchModel( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.bigquery.v2.ModelService/PatchModel", + google_dot_cloud_dot_bigquery__v2_dot_proto_dot_model__pb2.PatchModelRequest.SerializeToString, + google_dot_cloud_dot_bigquery__v2_dot_proto_dot_model__pb2.Model.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def DeleteModel( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.bigquery.v2.ModelService/DeleteModel", + google_dot_cloud_dot_bigquery__v2_dot_proto_dot_model__pb2.DeleteModelRequest.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/google/cloud/bigquery_v2/proto/model_reference_pb2.py b/google/cloud/bigquery_v2/proto/model_reference_pb2.py index 07d7e4c4b..2411c4863 100644 --- a/google/cloud/bigquery_v2/proto/model_reference_pb2.py +++ b/google/cloud/bigquery_v2/proto/model_reference_pb2.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/bigquery_v2/proto/model_reference.proto - +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection diff --git a/google/cloud/bigquery_v2/proto/model_reference_pb2_grpc.py b/google/cloud/bigquery_v2/proto/model_reference_pb2_grpc.py index 07cb78fe0..8a9393943 100644 --- a/google/cloud/bigquery_v2/proto/model_reference_pb2_grpc.py +++ b/google/cloud/bigquery_v2/proto/model_reference_pb2_grpc.py @@ -1,2 +1,3 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc diff --git a/google/cloud/bigquery_v2/proto/standard_sql_pb2.py b/google/cloud/bigquery_v2/proto/standard_sql_pb2.py index 15f6715a2..bfe77f934 100644 --- a/google/cloud/bigquery_v2/proto/standard_sql_pb2.py +++ b/google/cloud/bigquery_v2/proto/standard_sql_pb2.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/bigquery_v2/proto/standard_sql.proto - +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection diff --git a/google/cloud/bigquery_v2/proto/standard_sql_pb2_grpc.py b/google/cloud/bigquery_v2/proto/standard_sql_pb2_grpc.py index 07cb78fe0..8a9393943 100644 --- a/google/cloud/bigquery_v2/proto/standard_sql_pb2_grpc.py +++ b/google/cloud/bigquery_v2/proto/standard_sql_pb2_grpc.py @@ -1,2 +1,3 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc diff --git a/synth.metadata b/synth.metadata index f16e8183c..f131790f2 100644 --- a/synth.metadata +++ b/synth.metadata @@ -3,23 +3,23 @@ { "git": { "name": ".", - "remote": "https://github.com/googleapis/python-bigquery.git", - "sha": "3235255cc5f483949f34d2e8ef13b372e8713782" + "remote": "git@github.com:googleapis/python-bigquery", + "sha": "0946a5c460b0d675f6dbe4f053a7801edba36443" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "184661793fbe3b89f2b485c303e7466cef9d21a1", - "internalRef": "316182409" + "sha": "e6ab0a55f2195169feded73dd684574dd4bd9dfa", + "internalRef": "319180144" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "cf2eff09d0f5319a4dc5cdce2b6356d85af4a798" + "sha": "303271797a360f8a439203413f13a160f2f5b3b4" } } ], diff --git a/synth.py b/synth.py index 7fba81a5c..2bc3798ea 100644 --- a/synth.py +++ b/synth.py @@ -59,7 +59,9 @@ # Add templated files # ---------------------------------------------------------------------------- templated_files = common.py_library(cov_level=100) -s.move(templated_files, excludes=["noxfile.py"]) + +# BigQuery has a custom multiprocessing note +s.move(templated_files, excludes=["noxfile.py", "docs/multiprocessing.rst"]) s.replace( "docs/conf.py",