Bug 509477 - protobuf python binding broken in F11
Summary: protobuf python binding broken in F11
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: protobuf
Version: 11
Hardware: All
OS: Linux
low
high
Target Milestone: ---
Assignee: Lev Shamardin
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-07-03 02:19 UTC by Conrad Steenberg
Modified: 2010-02-13 07:12 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-02-13 07:12:17 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Conrad Steenberg 2009-07-03 02:19:19 UTC
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

Comment 1 Eric Hopper 2009-08-31 06:08:07 UTC
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.

Comment 2 Eric Hopper 2010-02-13 06:40:01 UTC
This is now fixed since protobuf 2.2.0 was released, which was a couple of months ago at least.


Note You need to log in before you can comment on or make changes to this bug.