[SQL-CVS] r2985 - SQLObject/trunk/sqlobject
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: <sub...@co...> - 2007-09-25 15:38:55
|
Author: phd Date: 2007-09-25 09:38:45 -0600 (Tue, 25 Sep 2007) New Revision: 2985 Modified: SQLObject/trunk/sqlobject/col.py Log: Use pickle.HIGHEST_PROTOCOL by default. Modified: SQLObject/trunk/sqlobject/col.py =================================================================== --- SQLObject/trunk/sqlobject/col.py 2007-09-24 15:26:52 UTC (rev 2984) +++ SQLObject/trunk/sqlobject/col.py 2007-09-25 15:38:45 UTC (rev 2985) @@ -1433,12 +1433,12 @@ def from_python(self, value, state): if value is None: return None - return pickle.dumps(value) + return pickle.dumps(value, self.pickleProtocol) class SOPickleCol(SOBLOBCol): def __init__(self, **kw): - self.pickleProtocol = popKey(kw, 'pickleProtocol', 1) + self.pickleProtocol = popKey(kw, 'pickleProtocol', pickle.HIGHEST_PROTOCOL) super(SOPickleCol, self).__init__(**kw) def createValidators(self): |