new mcp servers format

This commit is contained in:
Davidson Gomes
2025-04-28 12:37:58 -03:00
parent 0112573d9b
commit e98744b7a4
7182 changed files with 4839 additions and 4998 deletions

View File

@@ -51,6 +51,24 @@ class SymbolDatabase():
"""Initializes a new SymbolDatabase."""
self.pool = pool or descriptor_pool.DescriptorPool()
def GetPrototype(self, descriptor):
warnings.warn('SymbolDatabase.GetPrototype() is deprecated. Please '
'use message_factory.GetMessageClass() instead. '
'SymbolDatabase.GetPrototype() will be removed soon.')
return message_factory.GetMessageClass(descriptor)
def CreatePrototype(self, descriptor):
warnings.warn('Directly call CreatePrototype() is wrong. Please use '
'message_factory.GetMessageClass() instead. '
'SymbolDatabase.CreatePrototype() will be removed soon.')
return message_factory._InternalCreateMessageClass(descriptor)
def GetMessages(self, files):
warnings.warn('SymbolDatabase.GetMessages() is deprecated. Please use '
'message_factory.GetMessageClassedForFiles() instead. '
'SymbolDatabase.GetMessages() will be removed soon.')
return message_factory.GetMessageClassedForFiles(files, self.pool)
def RegisterMessage(self, message):
"""Registers the given message type in the local database.