See http://code.google.com/p/protobuf/issues/detail?id=46 Description of problem: Python binding of protobuf 2.0.2 broken on import, quoted from the Google bug: import google.protobuf.descriptor_pb2 What is the expected output? What do you see instead? There should be no output on a successful import of this code, but instead this error occurs: Python 2.6 (r26:66721, Oct 2 2008, 11:35:03) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import google.protobuf.descriptor_pb2 Traceback (most recent call last): File "<stdin>", line 1, in <module> File "...\lib\site-packages\google\protobuf\descriptor_pb2.py", line 737, in <module> class FileDescriptorSet(message.Message): File "...\lib\site-packages\google\protobuf\reflection.py", line 141, in __init__ superclass.__init__(cls, name, bases, dictionary) TypeError: Error when calling the metaclass bases type.__init__() takes 1 or 3 arguments Version-Release number of selected component (if applicable): protobuf-2.0.2-8.fc11 How reproducible: Always How to fix: Update to protobuf-2.0.3 or later
It can be fixed by hand editing the superclass.__init__ call to not include the cls parameter. But that's really, really ugly. There is a much newer version (2.2.0) of protobuf available that fixes this issue and also includes numerous speed improvements. I also know that a version is coming fairly soon that includes some Python specific speed improvements.
This is now fixed since protobuf 2.2.0 was released, which was a couple of months ago at least.