Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-grpcio-tools for 
openSUSE:Factory checked in at 2021-03-05 13:48:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-grpcio-tools (Old)
 and      /work/SRC/openSUSE:Factory/.python-grpcio-tools.new.2378 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-grpcio-tools"

Fri Mar  5 13:48:56 2021 rev:6 rq:876919 version:1.36.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-grpcio-tools/python-grpcio-tools.changes  
2021-02-26 21:59:35.379828104 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-grpcio-tools.new.2378/python-grpcio-tools.changes
        2021-03-05 13:51:14.115950073 +0100
@@ -1,0 +2,7 @@
+Thu Mar  4 22:54:17 UTC 2021 - Atri Bhattacharya <[email protected]>
+
+- Update to version 1.36.1:
+  * Core: back-port: add env var protection for google-c2p
+    resolver (gh#grpc/grpc#25569).
+
+-------------------------------------------------------------------

Old:
----
  grpcio-tools-1.35.0.tar.gz

New:
----
  grpcio-tools-1.36.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-grpcio-tools.spec ++++++
--- /var/tmp/diff_new_pack.Mn8A18/_old  2021-03-05 13:51:14.667950604 +0100
+++ /var/tmp/diff_new_pack.Mn8A18/_new  2021-03-05 13:51:14.671950607 +0100
@@ -20,7 +20,7 @@
 %define         skip_python2 1
 
 Name:           python-grpcio-tools
-Version:        1.35.0
+Version:        1.36.1
 Release:        0
 Summary:        Protobuf code generator for gRPC
 License:        Apache-2.0

++++++ grpcio-tools-1.35.0.tar.gz -> grpcio-tools-1.36.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/grpcio-tools-1.35.0/PKG-INFO 
new/grpcio-tools-1.36.1/PKG-INFO
--- old/grpcio-tools-1.35.0/PKG-INFO    2021-01-19 20:02:56.000000000 +0100
+++ new/grpcio-tools-1.36.1/PKG-INFO    2021-03-02 21:08:54.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: grpcio-tools
-Version: 1.35.0
+Version: 1.36.1
 Summary: Protobuf code generator for gRPC
 Home-page: https://grpc.io
 Author: The gRPC Authors
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/grpcio-tools-1.35.0/grpc_root/include/grpc/grpc_security.h 
new/grpcio-tools-1.36.1/grpc_root/include/grpc/grpc_security.h
--- old/grpcio-tools-1.35.0/grpc_root/include/grpc/grpc_security.h      
2021-01-19 20:02:22.000000000 +0100
+++ new/grpcio-tools-1.36.1/grpc_root/include/grpc/grpc_security.h      
2021-03-02 21:08:08.000000000 +0100
@@ -856,8 +856,8 @@
 
 /**
  * Sets the options of whether to request and verify client certs. This should
- * be called only on the server side. It returns 1 on success and 0 on failure.
- * It is used for experimental purpose for now and subject to change.
+ * be called only on the server side. It is used for experimental purpose for
+ * now and subject to change.
  */
 GRPCAPI void grpc_tls_credentials_options_set_cert_request_type(
     grpc_tls_credentials_options* options,
@@ -868,8 +868,7 @@
  * hostname check, etc. This should be called only on the client side. If
  * |server_verification_option| is not GRPC_TLS_SERVER_VERIFICATION, use of a
  * custom authorization check (grpc_tls_server_authorization_check_config) is
- * mandatory. It returns 1 on success and 0 on failure. It is used for
- * experimental purpose for now and subject to change.
+ * mandatory. It is used for experimental purpose for now and subject to 
change.
  */
 GRPCAPI void grpc_tls_credentials_options_set_server_verification_option(
     grpc_tls_credentials_options* options,
@@ -878,7 +877,6 @@
 /**
  * Sets the credential provider in the options.
  * The |options| will implicitly take a new ref to the |provider|.
- * It returns 1 on success and 0 on failure.
  * It is used for experimental purpose for now and subject to change.
  */
 GRPCAPI void grpc_tls_credentials_options_set_certificate_provider(
@@ -887,8 +885,14 @@
 
 /**
  * If set, gRPC stack will keep watching the root certificates with
- * name |root_cert_name|. It returns 1 on success and 0 on failure. It is used
- * for experimental purpose for now and subject to change.
+ * name |root_cert_name|.
+ * If this is not set on the client side, we will use the root certificates
+ * stored in the default system location, since client side must provide root
+ * certificates in TLS.
+ * If this is not set on the server side, we will not watch any root 
certificate
+ * updates, and assume no root certificates needed for the server(single-side
+ * TLS). Default root certs on the server side is not supported.
+ * It is used for experimental purpose for now and subject to change.
  */
 GRPCAPI void grpc_tls_credentials_options_watch_root_certs(
     grpc_tls_credentials_options* options);
@@ -903,8 +907,9 @@
 
 /**
  * If set, gRPC stack will keep watching the identity key-cert pairs
- * with name |identity_cert_name|. It returns 1 on success and 0 on failure. It
- * is used for experimental purpose for now and subject to change.
+ * with name |identity_cert_name|.
+ * This is required on the server side, and optional on the client side.
+ * It is used for experimental purpose for now and subject to change.
  */
 GRPCAPI void grpc_tls_credentials_options_watch_identity_key_cert_pairs(
     grpc_tls_credentials_options* options);
@@ -920,8 +925,8 @@
 /**
  * Sets the configuration for a custom authorization check performed at the end
  * of the handshake. The |options| will implicitly take a new ref to the
- * |config|. It returns 1 on success and 0 on failure. It is used for
- * experimental purpose for now and subject to change.
+ * |config|.
+ * It is used for experimental purpose for now and subject to change.
  */
 GRPCAPI void 
grpc_tls_credentials_options_set_server_authorization_check_config(
     grpc_tls_credentials_options* options,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/grpcio-tools-1.35.0/grpc_root/include/grpcpp/impl/codegen/async_unary_call.h
 
new/grpcio-tools-1.36.1/grpc_root/include/grpcpp/impl/codegen/async_unary_call.h
--- 
old/grpcio-tools-1.35.0/grpc_root/include/grpcpp/impl/codegen/async_unary_call.h
    2021-01-19 20:02:21.000000000 +0100
+++ 
new/grpcio-tools-1.36.1/grpc_root/include/grpcpp/impl/codegen/async_unary_call.h
    2021-03-02 21:08:08.000000000 +0100
@@ -250,7 +250,7 @@
     initial_metadata_read_ = true;
   }
 
-  /// See \a ClientAysncResponseReaderInterface::Finish for semantics.
+  /// See \a ClientAsyncResponseReaderInterface::Finish for semantics.
   ///
   /// Side effect:
   ///   - the \a ClientContext associated with this call is updated with
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/grpcio-tools-1.35.0/grpc_root/include/grpcpp/impl/codegen/security/auth_context.h
 
new/grpcio-tools-1.36.1/grpc_root/include/grpcpp/impl/codegen/security/auth_context.h
--- 
old/grpcio-tools-1.35.0/grpc_root/include/grpcpp/impl/codegen/security/auth_context.h
       2021-01-19 20:02:22.000000000 +0100
+++ 
new/grpcio-tools-1.36.1/grpc_root/include/grpcpp/impl/codegen/security/auth_context.h
       2021-03-02 21:08:08.000000000 +0100
@@ -86,7 +86,7 @@
 
   /// Mutation functions: should only be used by an AuthMetadataProcessor.
   virtual void AddProperty(const std::string& key, const string_ref& value) = 
0;
-  virtual bool SetPeerIdentityPropertyName(const string& name) = 0;
+  virtual bool SetPeerIdentityPropertyName(const std::string& name) = 0;
 };
 
 }  // namespace grpc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/grpcio-tools-1.35.0/grpc_root/include/grpcpp/impl/codegen/server_callback_handlers.h
 
new/grpcio-tools-1.36.1/grpc_root/include/grpcpp/impl/codegen/server_callback_handlers.h
--- 
old/grpcio-tools-1.35.0/grpc_root/include/grpcpp/impl/codegen/server_callback_handlers.h
    2021-01-19 20:02:21.000000000 +0100
+++ 
new/grpcio-tools-1.36.1/grpc_root/include/grpcpp/impl/codegen/server_callback_handlers.h
    2021-03-02 21:08:08.000000000 +0100
@@ -210,6 +210,9 @@
       grpc_call* call = call_.call();
       auto call_requester = std::move(call_requester_);
       allocator_state_->Release();
+      if (ctx_->context_allocator() != nullptr) {
+        ctx_->context_allocator()->Release(ctx_);
+      }
       this->~ServerCallbackUnaryImpl();  // explicitly call destructor
       ::grpc::g_core_codegen_interface->grpc_call_unref(call);
       call_requester();
@@ -402,6 +405,9 @@
       reactor_.load(std::memory_order_relaxed)->OnDone();
       grpc_call* call = call_.call();
       auto call_requester = std::move(call_requester_);
+      if (ctx_->context_allocator() != nullptr) {
+        ctx_->context_allocator()->Release(ctx_);
+      }
       this->~ServerCallbackReaderImpl();  // explicitly call destructor
       ::grpc::g_core_codegen_interface->grpc_call_unref(call);
       call_requester();
@@ -616,7 +622,11 @@
       // DefaultReactor (which is unary).
       this->MaybeDone(/*inlineable_ondone=*/false);
     }
-    ~ServerCallbackWriterImpl() { req_->~RequestType(); }
+    ~ServerCallbackWriterImpl() {
+      if (req_ != nullptr) {
+        req_->~RequestType();
+      }
+    }
 
     const RequestType* request() { return req_; }
 
@@ -624,6 +634,9 @@
       reactor_.load(std::memory_order_relaxed)->OnDone();
       grpc_call* call = call_.call();
       auto call_requester = std::move(call_requester_);
+      if (ctx_->context_allocator() != nullptr) {
+        ctx_->context_allocator()->Release(ctx_);
+      }
       this->~ServerCallbackWriterImpl();  // explicitly call destructor
       ::grpc::g_core_codegen_interface->grpc_call_unref(call);
       call_requester();
@@ -835,6 +848,9 @@
       reactor_.load(std::memory_order_relaxed)->OnDone();
       grpc_call* call = call_.call();
       auto call_requester = std::move(call_requester_);
+      if (ctx_->context_allocator() != nullptr) {
+        ctx_->context_allocator()->Release(ctx_);
+      }
       this->~ServerCallbackReaderWriterImpl();  // explicitly call destructor
       ::grpc::g_core_codegen_interface->grpc_call_unref(call);
       call_requester();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/grpcio-tools-1.35.0/grpc_root/include/grpcpp/impl/codegen/server_context.h 
new/grpcio-tools-1.36.1/grpc_root/include/grpcpp/impl/codegen/server_context.h
--- 
old/grpcio-tools-1.35.0/grpc_root/include/grpcpp/impl/codegen/server_context.h  
    2021-01-19 20:02:21.000000000 +0100
+++ 
new/grpcio-tools-1.36.1/grpc_root/include/grpcpp/impl/codegen/server_context.h  
    2021-03-02 21:08:08.000000000 +0100
@@ -100,6 +100,7 @@
 class GenericServerContext;
 class Server;
 class ServerInterface;
+class ContextAllocator;
 
 // TODO(vjpai): Remove namespace experimental when de-experimentalized fully.
 namespace experimental {
@@ -340,6 +341,12 @@
   ServerContextBase();
   ServerContextBase(gpr_timespec deadline, grpc_metadata_array* arr);
 
+  void set_context_allocator(ContextAllocator* context_allocator) {
+    context_allocator_ = context_allocator;
+  }
+
+  ContextAllocator* context_allocator() const { return context_allocator_; }
+
  private:
   friend class ::grpc::testing::InteropServerContextInspector;
   friend class ::grpc::testing::ServerContextTestSpouse;
@@ -463,6 +470,7 @@
 
   ::grpc::experimental::ServerRpcInfo* rpc_info_ = nullptr;
   ::grpc::experimental::RpcAllocatorState* message_allocator_state_ = nullptr;
+  ContextAllocator* context_allocator_ = nullptr;
 
   class Reactor : public ::grpc::ServerUnaryReactor {
    public:
@@ -590,12 +598,14 @@
   using ServerContextBase::compression_algorithm;
   using ServerContextBase::compression_level;
   using ServerContextBase::compression_level_set;
+  using ServerContextBase::context_allocator;
   using ServerContextBase::deadline;
   using ServerContextBase::IsCancelled;
   using ServerContextBase::peer;
   using ServerContextBase::raw_deadline;
   using ServerContextBase::set_compression_algorithm;
   using ServerContextBase::set_compression_level;
+  using ServerContextBase::set_context_allocator;
   using ServerContextBase::SetLoadReportingCosts;
   using ServerContextBase::TryCancel;
 
@@ -612,6 +622,37 @@
   CallbackServerContext& operator=(const CallbackServerContext&) = delete;
 };
 
+/// A CallbackServerContext allows users to use the contents of the
+/// CallbackServerContext or GenericCallbackServerContext structure for the
+/// callback API.
+/// The library will invoke the allocator any time a new call is initiated.
+/// and call the Release method after the server OnDone.
+class ContextAllocator {
+ public:
+  virtual ~ContextAllocator() {}
+
+  virtual CallbackServerContext* NewCallbackServerContext() { return nullptr; }
+
+#ifndef GRPC_CALLBACK_API_NONEXPERIMENTAL
+  virtual experimental::GenericCallbackServerContext*
+  NewGenericCallbackServerContext() {
+    return nullptr;
+  }
+#else
+  virtual GenericCallbackServerContext* NewGenericCallbackServerContext() {
+    return nullptr;
+  }
+#endif
+
+  virtual void Release(CallbackServerContext*) {}
+
+#ifndef GRPC_CALLBACK_API_NONEXPERIMENTAL
+  virtual void Release(experimental::GenericCallbackServerContext*) {}
+#else
+  virtual void Release(GenericCallbackServerContext*) {}
+#endif
+};
+
 }  // namespace grpc
 
 static_assert(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/grpcio-tools-1.35.0/grpc_root/include/grpcpp/impl/codegen/server_interface.h
 
new/grpcio-tools-1.36.1/grpc_root/include/grpcpp/impl/codegen/server_interface.h
--- 
old/grpcio-tools-1.35.0/grpc_root/include/grpcpp/impl/codegen/server_interface.h
    2021-01-19 20:02:21.000000000 +0100
+++ 
new/grpcio-tools-1.36.1/grpc_root/include/grpcpp/impl/codegen/server_interface.h
    2021-03-02 21:08:08.000000000 +0100
@@ -147,6 +147,8 @@
     /// May not be abstract since this is a post-1.0 API addition
     virtual void RegisterCallbackGenericService(
         experimental::CallbackGenericService* /*service*/) {}
+    virtual void RegisterContextAllocator(
+        std::unique_ptr<ContextAllocator> context_allocator) {}
   };
 
   /// NOTE: The function experimental_registration() is not stable public API.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/grpcio-tools-1.35.0/grpc_root/include/grpcpp/security/credentials.h 
new/grpcio-tools-1.36.1/grpc_root/include/grpcpp/security/credentials.h
--- old/grpcio-tools-1.35.0/grpc_root/include/grpcpp/security/credentials.h     
2021-01-19 20:02:22.000000000 +0100
+++ new/grpcio-tools-1.36.1/grpc_root/include/grpcpp/security/credentials.h     
2021-03-02 21:08:08.000000000 +0100
@@ -277,6 +277,12 @@
 std::shared_ptr<CallCredentials> MetadataCredentialsFromPlugin(
     std::unique_ptr<MetadataCredentialsPlugin> plugin);
 
+/// Builds External Account credentials.
+/// json_string is the JSON string containing the credentials options.
+/// scopes contains the scopes to be binded with the credentials.
+std::shared_ptr<CallCredentials> ExternalAccountCredentials(
+    const grpc::string& json_string, const std::vector<grpc::string>& scopes);
+
 namespace experimental {
 
 /// Options for creating STS Oauth Token Exchange credentials following the 
IETF
@@ -307,12 +313,6 @@
 std::shared_ptr<CallCredentials> StsCredentials(
     const StsCredentialsOptions& options);
 
-/// Builds External Account credentials.
-/// json_string is the JSON string containing the credentials options.
-/// scopes contains the scopes to be binded with the credentials.
-std::shared_ptr<CallCredentials> ExternalAccountCredentials(
-    const grpc::string& json_string, const std::vector<grpc::string>& scopes);
-
 std::shared_ptr<CallCredentials> MetadataCredentialsFromPlugin(
     std::unique_ptr<MetadataCredentialsPlugin> plugin,
     grpc_security_level min_security_level);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/grpcio-tools-1.35.0/grpc_root/include/grpcpp/security/server_credentials.h 
new/grpcio-tools-1.36.1/grpc_root/include/grpcpp/security/server_credentials.h
--- 
old/grpcio-tools-1.35.0/grpc_root/include/grpcpp/security/server_credentials.h  
    2021-01-19 20:02:22.000000000 +0100
+++ 
new/grpcio-tools-1.36.1/grpc_root/include/grpcpp/security/server_credentials.h  
    2021-03-02 21:08:08.000000000 +0100
@@ -67,9 +67,10 @@
 }  // namespace experimental
 
 /// Wrapper around \a grpc_server_credentials, a way to authenticate a server.
-class ServerCredentials {
+class ServerCredentials : private grpc::GrpcLibraryCodegen {
  public:
-  virtual ~ServerCredentials();
+  ServerCredentials();
+  ~ServerCredentials() override;
 
   /// This method is not thread-safe and has to be called before the server is
   /// started. The last call to this function wins.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/grpcio-tools-1.35.0/grpc_root/include/grpcpp/security/tls_credentials_options.h
 
new/grpcio-tools-1.36.1/grpc_root/include/grpcpp/security/tls_credentials_options.h
--- 
old/grpcio-tools-1.35.0/grpc_root/include/grpcpp/security/tls_credentials_options.h
 2021-01-19 20:02:22.000000000 +0100
+++ 
new/grpcio-tools-1.36.1/grpc_root/include/grpcpp/security/tls_credentials_options.h
 2021-03-02 21:08:08.000000000 +0100
@@ -155,13 +155,21 @@
   //
   // @param certificate_provider the provider which fetches TLS credentials 
that
   // will be used in the TLS handshake
-  explicit TlsCredentialsOptions(
-      std::shared_ptr<CertificateProviderInterface> certificate_provider);
+  TlsCredentialsOptions();
   // ---- Setters for member fields ----
+  // Sets the certificate provider used to store root certs and identity certs.
+  void set_certificate_provider(
+      std::shared_ptr<CertificateProviderInterface> certificate_provider);
   // Watches the updates of root certificates with name |root_cert_name|.
-  // If used in TLS credentials, it should always be set unless the root
-  // certificates are not needed(e.g. in the one-side TLS scenario, the server
-  // is not required to verify the client).
+  // If used in TLS credentials, setting this field is optional for both the
+  // client side and the server side.
+  // If this is not set on the client side, we will use the root certificates
+  // stored in the default system location, since client side must provide root
+  // certificates in TLS(no matter single-side TLS or mutual TLS).
+  // If this is not set on the server side, we will not watch any root
+  // certificate updates, and assume no root certificates needed for the server
+  // (in the one-side TLS scenario, the server is not required to provide root
+  // certs). We don't support default root certs on server side.
   void watch_root_certs();
   // Sets the name of root certificates being watched, if |watch_root_certs| is
   // called. If not set, an empty string will be used as the name.
@@ -169,9 +177,9 @@
   // @param root_cert_name the name of root certs being set.
   void set_root_cert_name(const std::string& root_cert_name);
   // Watches the updates of identity key-cert pairs with name
-  // |identity_cert_name|. If used in TLS credentials, it should always be set
-  // unless the identity certificates are not needed(e.g. in the one-side TLS
-  // scenario, the client is not required to provide certs).
+  // |identity_cert_name|. If used in TLS credentials, it is required to be set
+  // on the server side, and optional for the client side(in the one-side
+  // TLS scenario, the client is not required to provide identity certs).
   void watch_identity_key_cert_pairs();
   // Sets the name of identity key-cert pairs being watched, if
   // |watch_identity_key_cert_pairs| is called. If not set, an empty string 
will
@@ -192,13 +200,13 @@
 };
 
 // Contains configurable options on the client side.
+// Client side doesn't need to always use certificate provider. When the
+// certificate provider is not set, we will use the root certificates stored
+// in the system default locations, and assume client won't provide any
+// identity certificates(single side TLS).
 // It is used for experimental purposes for now and it is subject to change.
 class TlsChannelCredentialsOptions final : public TlsCredentialsOptions {
  public:
-  explicit TlsChannelCredentialsOptions(
-      std::shared_ptr<CertificateProviderInterface> certificate_provider)
-      : TlsCredentialsOptions(std::move(certificate_provider)) {}
-
   // Sets the option to verify the server.
   // The default is GRPC_TLS_SERVER_VERIFICATION.
   void set_server_verification_option(
@@ -215,9 +223,13 @@
 // It is used for experimental purposes for now and it is subject to change.
 class TlsServerCredentialsOptions final : public TlsCredentialsOptions {
  public:
+  // Server side is required to use a provider, because server always needs to
+  // use identity certs.
   explicit TlsServerCredentialsOptions(
       std::shared_ptr<CertificateProviderInterface> certificate_provider)
-      : TlsCredentialsOptions(std::move(certificate_provider)) {}
+      : TlsCredentialsOptions() {
+    set_certificate_provider(certificate_provider);
+  }
 
   // Sets option to request the certificates from the client.
   // The default is GRPC_SSL_DONT_REQUEST_CLIENT_CERTIFICATE.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/grpcio-tools-1.35.0/grpc_root/include/grpcpp/server.h 
new/grpcio-tools-1.36.1/grpc_root/include/grpcpp/server.h
--- old/grpcio-tools-1.35.0/grpc_root/include/grpcpp/server.h   2021-01-19 
20:02:21.000000000 +0100
+++ new/grpcio-tools-1.36.1/grpc_root/include/grpcpp/server.h   2021-03-02 
21:08:08.000000000 +0100
@@ -203,6 +203,8 @@
     health_check_service_ = std::move(service);
   }
 
+  ContextAllocator* context_allocator() { return context_allocator_.get(); }
+
   /// NOTE: This method is not part of the public API for this class.
   bool health_check_service_disabled() const {
     return health_check_service_disabled_;
@@ -240,6 +242,12 @@
   /// ownership of theservice. The service must exist for the lifetime of the
   /// Server instance.
   void RegisterCallbackGenericService(CallbackGenericService* service) 
override;
+
+  void RegisterContextAllocator(
+      std::unique_ptr<ContextAllocator> context_allocator) {
+    context_allocator_ = std::move(context_allocator);
+  }
+
 #else
   /// NOTE: class experimental_registration_type is not part of the public API
   /// of this class
@@ -254,6 +262,11 @@
       server_->RegisterCallbackGenericService(service);
     }
 
+    void RegisterContextAllocator(
+        std::unique_ptr<ContextAllocator> context_allocator) override {
+      server_->context_allocator_ = std::move(context_allocator);
+    }
+
    private:
     Server* server_;
   };
@@ -342,6 +355,8 @@
 
   std::unique_ptr<ServerInitializer> server_initializer_;
 
+  std::unique_ptr<ContextAllocator> context_allocator_;
+
   std::unique_ptr<HealthCheckServiceInterface> health_check_service_;
   bool health_check_service_disabled_;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/grpcio-tools-1.35.0/grpc_root/include/grpcpp/server_builder.h 
new/grpcio-tools-1.36.1/grpc_root/include/grpcpp/server_builder.h
--- old/grpcio-tools-1.35.0/grpc_root/include/grpcpp/server_builder.h   
2021-01-19 20:02:21.000000000 +0100
+++ new/grpcio-tools-1.36.1/grpc_root/include/grpcpp/server_builder.h   
2021-03-02 21:08:08.000000000 +0100
@@ -269,6 +269,11 @@
       builder_->interceptor_creators_ = std::move(interceptor_creators);
     }
 
+    /// Set the allocator for creating and releasing callback server context.
+    /// Takes the owndership of the allocator.
+    ServerBuilder& SetContextAllocator(
+        std::unique_ptr<grpc::ContextAllocator> context_allocator);
+
 #ifndef GRPC_CALLBACK_API_NONEXPERIMENTAL
     /// Register a generic service that uses the callback API.
     /// Matches requests with any :authority
@@ -389,6 +394,7 @@
   std::vector<std::unique_ptr<grpc::ServerBuilderPlugin>> plugins_;
   grpc_resource_quota* resource_quota_;
   grpc::AsyncGenericService* generic_service_{nullptr};
+  std::unique_ptr<ContextAllocator> context_allocator_;
 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
   grpc::CallbackGenericService* callback_generic_service_{nullptr};
 #else
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/grpcio-tools-1.35.0/grpc_root/include/grpcpp/support/error_details.h 
new/grpcio-tools-1.36.1/grpc_root/include/grpcpp/support/error_details.h
--- old/grpcio-tools-1.35.0/grpc_root/include/grpcpp/support/error_details.h    
2021-01-19 20:02:22.000000000 +0100
+++ new/grpcio-tools-1.36.1/grpc_root/include/grpcpp/support/error_details.h    
2021-03-02 21:08:08.000000000 +0100
@@ -21,12 +21,6 @@
 
 #include <grpcpp/support/status.h>
 
-namespace google {
-namespace rpc {
-class Status;
-}  // namespace rpc
-}  // namespace google
-
 namespace grpc {
 
 /// Map a \a grpc::Status to a \a google::rpc::Status.
@@ -34,14 +28,48 @@
 /// On success, returns status with OK.
 /// Returns status with \a INVALID_ARGUMENT, if failed to deserialize.
 /// Returns status with \a FAILED_PRECONDITION, if \a to is nullptr.
-grpc::Status ExtractErrorDetails(const grpc::Status& from,
-                                 ::google::rpc::Status* to);
+///
+/// \note
+/// This function is a template to avoid a build dep on \a status.proto.
+/// However, this function still requires that \tparam T is of type
+/// \a google::rpc::Status, which is defined at
+/// 
https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto
+template <typename T>
+grpc::Status ExtractErrorDetails(const grpc::Status& from, T* to) {
+  if (to == nullptr) {
+    return grpc::Status(grpc::StatusCode::FAILED_PRECONDITION, "");
+  }
+  if (!to->ParseFromString(from.error_details())) {
+    return grpc::Status(grpc::StatusCode::INVALID_ARGUMENT, "");
+  }
+  return grpc::Status::OK;
+}
+inline grpc::Status ExtractErrorDetails(const grpc::Status&, std::nullptr_t) {
+  return grpc::Status(grpc::StatusCode::FAILED_PRECONDITION, "");
+}
 
 /// Map \a google::rpc::Status to a \a grpc::Status.
 /// Returns OK on success.
 /// Returns status with \a FAILED_PRECONDITION if \a to is nullptr.
-grpc::Status SetErrorDetails(const ::google::rpc::Status& from,
-                             grpc::Status* to);
+///
+/// \note
+/// This function is a template to avoid a build dep on \a status.proto.
+/// However, this function still requires that \tparam T is of type
+/// \a google::rpc::Status, which is defined at
+/// 
https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto
+template <typename T>
+grpc::Status SetErrorDetails(const T& from, grpc::Status* to) {
+  if (to == nullptr) {
+    return grpc::Status(grpc::StatusCode::FAILED_PRECONDITION, "");
+  }
+  grpc::StatusCode code = grpc::StatusCode::UNKNOWN;
+  if (from.code() >= grpc::StatusCode::OK &&
+      from.code() <= grpc::StatusCode::UNAUTHENTICATED) {
+    code = static_cast<grpc::StatusCode>(from.code());
+  }
+  *to = grpc::Status(code, from.message(), from.SerializeAsString());
+  return grpc::Status::OK;
+}
 
 }  // namespace grpc
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/grpcio-tools-1.35.0/grpc_tools/_protoc_compiler.cpp 
new/grpcio-tools-1.36.1/grpc_tools/_protoc_compiler.cpp
--- old/grpcio-tools-1.35.0/grpc_tools/_protoc_compiler.cpp     2021-01-19 
20:02:50.000000000 +0100
+++ new/grpcio-tools-1.36.1/grpc_tools/_protoc_compiler.cpp     2021-03-02 
21:08:52.000000000 +0100
@@ -1,4 +1,4 @@
-/* Generated by Cython 0.29.21 */
+/* Generated by Cython 0.29.22 */
 
 /* BEGIN: Cython Metadata
 {
@@ -208,8 +208,8 @@
 #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && 
PY_VERSION_HEX < 0x03030000)
     #error Cython requires Python 2.6+ or Python 3.3+.
 #else
-#define CYTHON_ABI "0_29_21"
-#define CYTHON_HEX_VERSION 0x001D15F0
+#define CYTHON_ABI "0_29_22"
+#define CYTHON_HEX_VERSION 0x001D16F0
 #define CYTHON_FUTURE_DIVISION 0
 #include <stddef.h>
 #ifndef offsetof
@@ -1536,8 +1536,10 @@
 static void __Pyx_AddTraceback(const char *funcname, int c_line,
                                int py_line, const char *filename);
 
-/* CIntToPy.proto */
-static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
+/* GCCDiagnostics.proto */
+#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 
6))
+#define __Pyx_HAS_GCC_DIAGNOSTIC
+#endif
 
 /* CppExceptionConversion.proto */
 #ifndef __Pyx_CppExn2PyErr
@@ -1581,6 +1583,9 @@
 }
 #endif
 
+/* CIntToPy.proto */
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
+
 /* CIntFromPy.proto */
 static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *);
 
@@ -6902,7 +6907,7 @@
         if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
             return __Pyx_PyObject_CallMethO(func, arg);
 #if CYTHON_FAST_PYCCALL
-        } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
+        } else if (__Pyx_PyFastCFunction_Check(func)) {
             return __Pyx_PyCFunction_FastCall(func, &arg, 1);
 #endif
         }
@@ -8252,7 +8257,14 @@
 
 /* CIntToPy */
 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
-    const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wconversion"
+#endif
+    const int neg_one = (int) -1, const_zero = (int) 0;
+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
+#pragma GCC diagnostic pop
+#endif
     const int is_unsigned = neg_one > const_zero;
     if (is_unsigned) {
         if (sizeof(int) < sizeof(long)) {
@@ -8305,7 +8317,14 @@
 
 /* CIntFromPy */
 static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) {
-    const size_t neg_one = (size_t) ((size_t) 0 - (size_t) 1), const_zero = 
(size_t) 0;
+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wconversion"
+#endif
+    const size_t neg_one = (size_t) -1, const_zero = (size_t) 0;
+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
+#pragma GCC diagnostic pop
+#endif
     const int is_unsigned = neg_one > const_zero;
 #if PY_MAJOR_VERSION < 3
     if (likely(PyInt_Check(x))) {
@@ -8494,7 +8513,14 @@
 
 /* CIntToPy */
 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
-    const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wconversion"
+#endif
+    const long neg_one = (long) -1, const_zero = (long) 0;
+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
+#pragma GCC diagnostic pop
+#endif
     const int is_unsigned = neg_one > const_zero;
     if (is_unsigned) {
         if (sizeof(long) < sizeof(long)) {
@@ -8525,7 +8551,14 @@
 
 /* CIntFromPy */
 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
-    const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wconversion"
+#endif
+    const long neg_one = (long) -1, const_zero = (long) 0;
+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
+#pragma GCC diagnostic pop
+#endif
     const int is_unsigned = neg_one > const_zero;
 #if PY_MAJOR_VERSION < 3
     if (likely(PyInt_Check(x))) {
@@ -8714,7 +8747,14 @@
 
 /* CIntFromPy */
 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
-    const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wconversion"
+#endif
+    const int neg_one = (int) -1, const_zero = (int) 0;
+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
+#pragma GCC diagnostic pop
+#endif
     const int is_unsigned = neg_one > const_zero;
 #if PY_MAJOR_VERSION < 3
     if (likely(PyInt_Check(x))) {
@@ -9435,6 +9475,30 @@
     }
     return retval;
 }
+#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && 
(defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
+static CYTHON_INLINE
+PyObject *__Pyx_PyGen_Send(PyGenObject *gen, PyObject *arg) {
+#if PY_VERSION_HEX <= 0x030A00A1
+    return _PyGen_Send(gen, arg);
+#else
+    PyObject *result;
+    if (PyIter_Send((PyObject*)gen, arg ? arg : Py_None, &result) == 
PYGEN_RETURN) {
+        if (PyAsyncGen_CheckExact(gen)) {
+            assert(result == Py_None);
+            PyErr_SetNone(PyExc_StopAsyncIteration);
+        }
+        else if (result == Py_None) {
+            PyErr_SetNone(PyExc_StopIteration);
+        }
+        else {
+            _PyGen_SetStopIterationValue(result);
+        }
+        Py_CLEAR(result);
+    }
+    return result;
+#endif
+}
+#endif
 static CYTHON_INLINE
 PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) {
     PyObject *ret;
@@ -9471,12 +9535,12 @@
         #endif
         #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && 
(defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
         if (PyGen_CheckExact(yf)) {
-            ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : 
value);
+            ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : 
value);
         } else
         #endif
         #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03050000 && 
defined(PyCoro_CheckExact) && (defined(__linux__) || PY_VERSION_HEX >= 
0x030600B3)
         if (PyCoro_CheckExact(yf)) {
-            ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : 
value);
+            ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : 
value);
         } else
         #endif
         {
@@ -9560,7 +9624,7 @@
         #endif
         #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && 
(defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
         if (PyGen_CheckExact(yf)) {
-            ret = _PyGen_Send((PyGenObject*)yf, NULL);
+            ret = __Pyx_PyGen_Send((PyGenObject*)yf, NULL);
         } else
         #endif
         #ifdef __Pyx_Coroutine_USED
@@ -9763,7 +9827,7 @@
     }
 #if !CYTHON_USE_TP_FINALIZE
     assert(self->ob_refcnt == 0);
-    self->ob_refcnt = 1;
+    __Pyx_SET_REFCNT(self, 1);
 #endif
     __Pyx_PyThreadState_assign
     __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
@@ -9837,7 +9901,7 @@
     {
         Py_ssize_t refcnt = self->ob_refcnt;
         _Py_NewReference(self);
-        self->ob_refcnt = refcnt;
+        __Pyx_SET_REFCNT(self, refcnt);
     }
 #if CYTHON_COMPILING_IN_CPYTHON
     assert(PyType_IS_GC(self->ob_type) &&
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/grpcio-tools-1.35.0/grpc_version.py 
new/grpcio-tools-1.36.1/grpc_version.py
--- old/grpcio-tools-1.35.0/grpc_version.py     2021-01-19 19:37:46.000000000 
+0100
+++ new/grpcio-tools-1.36.1/grpc_version.py     2021-03-02 20:44:40.000000000 
+0100
@@ -14,5 +14,5 @@
 
 # AUTO-GENERATED FROM 
`$REPO_ROOT/templates/tools/distrib/python/grpcio_tools/grpc_version.py.template`!!!
 
-VERSION = '1.35.0'
+VERSION = '1.36.1'
 PROTOBUF_VERSION = '3.14.0'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/grpcio-tools-1.35.0/grpcio_tools.egg-info/PKG-INFO 
new/grpcio-tools-1.36.1/grpcio_tools.egg-info/PKG-INFO
--- old/grpcio-tools-1.35.0/grpcio_tools.egg-info/PKG-INFO      2021-01-19 
20:02:50.000000000 +0100
+++ new/grpcio-tools-1.36.1/grpcio_tools.egg-info/PKG-INFO      2021-03-02 
21:08:52.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: grpcio-tools
-Version: 1.35.0
+Version: 1.36.1
 Summary: Protobuf code generator for gRPC
 Home-page: https://grpc.io
 Author: The gRPC Authors
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/grpcio-tools-1.35.0/grpcio_tools.egg-info/requires.txt 
new/grpcio-tools-1.36.1/grpcio_tools.egg-info/requires.txt
--- old/grpcio-tools-1.35.0/grpcio_tools.egg-info/requires.txt  2021-01-19 
20:02:50.000000000 +0100
+++ new/grpcio-tools-1.36.1/grpcio_tools.egg-info/requires.txt  2021-03-02 
21:08:52.000000000 +0100
@@ -1,3 +1,3 @@
 protobuf<4.0dev,>=3.5.0.post1
-grpcio>=1.35.0
+grpcio>=1.36.1
 setuptools

Reply via email to