Does Python 3.x implement metaclasses the same way?  It looks to me like the
metaclass may not be getting applied.

On Mon, Sep 14, 2009 at 5:21 PM, cjimison <cjimi...@gmail.com> wrote:

>
> Hi all,
>
> Our application has an embedded python 3.1 interpreter and we would
> really like to use protocol buffers.  I have started to make the
> protocol buffers python 3 compatible but I am running into issues with
> starting up the module.  I create a very simple proto definition in a
> file Example.proto:
>
> package tutorial;
>
> message MyTest {
>    required string name = 1;
> }
>
> and generated the Example_pb2.proto file with no problems at all.
> When I run the following script:
>
> import Example_pb2
>
> test = Example_pb2.MyTest()
> test.name = "Bob"
> test.SerializeToString()    # ERROR raise NotImplementedError
> NotImplementedError
>
> It looks to me like it is trying to call the SerializeToString in the
> message.py message class which should be abstract.  I had to remove
> the __import__('pkg_resources').declare_namespace(__name__) call in
> python\google\__init__.py  so I think something is not getting
> "initialized" correctly.
>
> Any ideas?
>
> Thanks for the help!
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to protobuf@googlegroups.com
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to