Re: Custom Class Serialization with Serpent.
"Christian O'Reilly" <[email protected]> Mon, 16 Dec 2013 10:33:19 -0500
| Newsgroups | gmane.comp.python.pyro |
|---|---|
| Message-ID | <CAKpGTkZAGOY7XzpYGhAN1_MQ28djcWh1+vQP46Fr+0SHBr6BzQ@mail.gmail.com> |
Hi Abhishek, My way of dealing with this in the past was to avoid using unsuported types within my classes that need to be serialized. I don't know much about Python's IPv4 class, but I suppose you can probably save a string representation of your IPv4 object in your class needing serializiation, converting this string representation to an IPv4 object manually whenever it is needed. Of course, it would be much nicer if we could just decorate some of our classe's methods with @sepent_serialize and @serpent_unserialize decorators to implement the serialization for custom classes... but I don't think there is such mechanism implemented (yet) in serpent... I hope it can help, Christian 2013/12/15 Abhishek Dwaraki <[email protected]> > Hey folks, > I have gone through the Pyro documentation and even the > tutorials. I implemented a Pyro example for my work. Unfortunately, I am > getting a Protocol Error saying that the class is unsupported. > > I did try to convert the received object back to the proper types, but it > still throws the error. The only “unsupported” type I have in my object is > Python 3.3’s new IPv4 address object (well, the one that the built in > module supports). > > The serialization is working in Pickle but not with Serpent. Can someone > point me in the right direction? Or am I doing something blatantly wrong > and not realizing it? > > Regards, > Abhishek. > > ------------------------------------------------------------------------------ > Rapidly troubleshoot problems before they affect your business. Most IT > organizations don't have a clear picture of how application performance > affects their revenue. With AppDynamics, you get 100% visibility into your > Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics > Pro! > http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk > _______________________________________________ > Pyro-core mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/pyro-core > ------------------------------------------------------------------------------ Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk _______________________________________________ Pyro-core mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pyro-core