diff options
author | siddharthshukla <siddharthshukla@outlook.com> | 2016-09-08 09:09:27 +0200 |
---|---|---|
committer | Siddharth Shukla <siddharthshukla@outlook.com> | 2016-09-22 21:14:24 +0200 |
commit | 72b872d4ffdb591f351cbadadcac14d41b385994 (patch) | |
tree | 4cef2e243e6ab5c928d2573d71645bfbe56215a8 | |
parent | cc730a413768cfa545b1ad44d2c3eb4f027936c8 (diff) |
Add docstrings to generated beta elements
Add docstrings mentioning that the Beta API is deprecated post 0.14.x in
- PrintBetaServicer
- PrintBetaStub
- PrintBetaServerFactory
- PrintBetaStubFactory
-rw-r--r-- | src/compiler/python_generator.cc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/compiler/python_generator.cc b/src/compiler/python_generator.cc index c5f1ed8061..0e7b9fbf4d 100644 --- a/src/compiler/python_generator.cc +++ b/src/compiler/python_generator.cc @@ -236,6 +236,10 @@ bool PrintBetaServicer(const ServiceDescriptor* service, service->name()); { IndentScope raii_class_indent(out); + out->Print("\"\"\"The Beta API is deprecated for 0.15.0 and later.\n" + "\nIt is recommended to use the GA API (classes and functions in this\n" + "file not marked beta) for all further purposes. This class was generated\n" + "only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0.\"\"\"\n"); PrintAllComments(service, out); for (int i = 0; i < service->method_count(); ++i) { auto meth = service->method(i); @@ -259,6 +263,10 @@ bool PrintBetaStub(const ServiceDescriptor* service, out->Print("class Beta$Service$Stub(object):\n", "Service", service->name()); { IndentScope raii_class_indent(out); + out->Print("\"\"\"The Beta API is deprecated for 0.15.0 and later.\n" + "\nIt is recommended to use the GA API (classes and functions in this\n" + "file not marked beta) for all further purposes. This class was generated\n" + "only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0.\"\"\"\n"); PrintAllComments(service, out); for (int i = 0; i < service->method_count(); ++i) { const MethodDescriptor* meth = service->method(i); @@ -287,6 +295,11 @@ bool PrintBetaServerFactory(const grpc::string& package_qualified_service_name, "Service", service->name()); { IndentScope raii_create_server_indent(out); + out->Print("\"\"\"The Beta API is deprecated for 0.15.0 and later.\n" + "\nIt is recommended to use the GA API (classes and functions in this\n" + "file not marked beta) for all further purposes. This function was\n" + "generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0" + "\"\"\"\n"); map<grpc::string, grpc::string> method_implementation_constructors; map<grpc::string, grpc::string> input_message_modules_and_classes; map<grpc::string, grpc::string> output_message_modules_and_classes; @@ -381,6 +394,11 @@ bool PrintBetaStubFactory(const grpc::string& package_qualified_service_name, " metadata_transformer=None, pool=None, pool_size=None):\n"); { IndentScope raii_create_server_indent(out); + out->Print("\"\"\"The Beta API is deprecated for 0.15.0 and later.\n" + "\nIt is recommended to use the GA API (classes and functions in this\n" + "file not marked beta) for all further purposes. This function was\n" + "generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0" + "\"\"\"\n"); map<grpc::string, grpc::string> method_cardinalities; map<grpc::string, grpc::string> input_message_modules_and_classes; map<grpc::string, grpc::string> output_message_modules_and_classes; |