From 990a422b1b14503fcddb614796b7f05d7d48f387 Mon Sep 17 00:00:00 2001 From: Xuan Wang Date: Wed, 22 May 2024 09:05:14 -0700 Subject: [PATCH] [Python Server] Remove abstractmethod notation for add_registered_method_handlers (#36684) Remove `@abc.abstractmethod` so we don't break backward compatibility. Fix: https://github.com/grpc/grpc/issues/36683 Closes #36684 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36684 from XuanWang-Amos:remove_abstractmethod_for_registered_method f748fa6e7a5cddc7cdad8499a61f5dfd8e4b828c PiperOrigin-RevId: 636186951 --- src/python/grpcio/grpc/__init__.py | 2 -- src/python/grpcio/grpc/aio/_base_server.py | 2 -- 2 files changed, 4 deletions(-) diff --git a/src/python/grpcio/grpc/__init__.py b/src/python/grpcio/grpc/__init__.py index 406f5651516..8e1fb2631ad 100644 --- a/src/python/grpcio/grpc/__init__.py +++ b/src/python/grpcio/grpc/__init__.py @@ -1454,7 +1454,6 @@ class Server(abc.ABC): """ raise NotImplementedError() - @abc.abstractmethod def add_registered_method_handlers(self, service_name, method_handlers): """Registers GenericRpcHandlers with this Server. @@ -1468,7 +1467,6 @@ class Server(abc.ABC): method_handlers: A dictionary that maps method names to corresponding RpcMethodHandler. """ - raise NotImplementedError() @abc.abstractmethod def add_insecure_port(self, address): diff --git a/src/python/grpcio/grpc/aio/_base_server.py b/src/python/grpcio/grpc/aio/_base_server.py index 9563a7875bc..6be8527b901 100644 --- a/src/python/grpcio/grpc/aio/_base_server.py +++ b/src/python/grpcio/grpc/aio/_base_server.py @@ -136,7 +136,6 @@ class Server(abc.ABC): A bool indicates if the operation times out. """ - @abc.abstractmethod def add_registered_method_handlers(self, service_name, method_handlers): """Registers GenericRpcHandlers with this Server. @@ -147,7 +146,6 @@ class Server(abc.ABC): method_handlers: A dictionary that maps method names to corresponding RpcMethodHandler. """ - raise NotImplementedError() # pylint: disable=too-many-public-methods