[ZODB-Dev] zeopack error
Kaweh Kazemi
kaweh at me.com
Thu Feb 9 12:22:42 UTC 2012
>>
>> I suspect a bug in the application (defining persistent classes in __main__)
>> is the root problem that's aggravated by the cPickle problem.
>
> The pickle's classes were defined in a normal module, I think Marius
> just aliased those to modules to __main__ and defined the classes
> there in order to load the pickle without the original code:
>
>>>> sys.modules['game.objects.item'] = sys.modules['__main__'] # hack
>>>> sys.modules['game.objects'] = sys.modules['__main__'] # hack
>>>> sys.modules['game'] = sys.modules['__main__'] # hack
>
That's correct, we don't define classes in __main__. All our classes are in their own modules and are imported.
Kind regards,
Kaweh
More information about the ZODB-Dev
mailing list