diff --git a/python/google/protobuf/descriptor_pool.py b/python/google/protobuf/descriptor_pool.py index 1ebf11834a2c4..733c9a6ac8dde 100644 --- a/python/google/protobuf/descriptor_pool.py +++ b/python/google/protobuf/descriptor_pool.py @@ -74,8 +74,8 @@ def _Deprecated(func): def NewFunc(*args, **kwargs): warnings.warn( 'Call to deprecated function %s(). Note: Do add unlinked descriptors ' - 'to descriptor_pool is wrong. Use Add() or AddSerializedFile() ' - 'instead.' % func.__name__, + 'to descriptor_pool is wrong. Please use Add() or AddSerializedFile() ' + 'instead. This function will be removed soon.' % func.__name__, category=DeprecationWarning) return func(*args, **kwargs) NewFunc.__name__ = func.__name__ @@ -246,12 +246,6 @@ def _AddDescriptor(self, desc): self._descriptors[desc.full_name] = desc self._AddFileDescriptor(desc.file) - # Add EnumDescriptor to descriptor pool is deprecated. Please use Add() - # or AddSerializedFile() to add a FileDescriptorProto instead. - @_Deprecated - def AddEnumDescriptor(self, enum_desc): - self._AddEnumDescriptor(enum_desc) - # Never call this method. It is for internal usage only. def _AddEnumDescriptor(self, enum_desc): """Adds an EnumDescriptor to the pool.