Oleg Broytmann a =E9crit :
> On Sat, Aug 26, 2006 at 11:06:28PM +0200, sophana wrote:
>> I tried the following patch: In PickleValidator class
>> def from_python(self, value, state):
>> if value is None:
>> return None
>> - return pickle.dumps(value)
>> + return pickle.dumps(value,protocol=3Dself.pickleProtocol)
>> I need that because without protocol 2, I cannot store sqlobjects in
>> I know there is a workaround, but it would be cool to have that.
>> However this does not work because when reading back the object, I get
>> an error saying that the 'ascii' codec can't decode a specific byte.
>> Seems that the pickleCol uses BlobCol and mysql returns unicode...
>> SqlObject version is 0.7.0
> Does it work with SQLObject 0.7.1 + the latest patches for MySQLdb+u=
I removed all sqlobjects from my pickle cols. I will try to write a
small test for that one day. I'm really very busy on my project. Sorry.
However, storing sqlobjects inside a pickle col is not always a good
idea. When you want to delete an object, you can't search in these
pickled object if there is an occurence of it... I liked to do it
because the schema evolution was difficult. Now with my small helper
routine, I can add cols easily and even set a default value. I'm trying
not to use pickle anymore.