On Fri, Nov 09, 2007 at 09:13:30AM +0200, Dan Pascu wrote: > try: > from sqlite import encode, decode > except ImportError: > import base64 > sqlite.encode = base64.encodestring > sqlite.decode = base64.decodestring > else: > sqlite.encode = encode > sqlite.decode = decode > > Now if I have pysqlite2 installed it will be preferred over sqlite. > However the issue is that if I also have sqlite installed it will import > the encode/decode functions from there, while if I don't it will use > base64 encoding. > > I was recently hit by this as I has both installed and I was using a > sqlite3 database with PickleCol. Later I removed sqlite and suddenly my > database stopped working and gave errors on the pickle columns as the > encoder/decoder changed. > > IMO if we use pysqlite2 or sqlite3 we shouldn't import encoders/decoders > from the old sqlite module, but instead use base64 always.
You are right. Oleg. -- Oleg Broytmann http://phd.pp.ru/ [EMAIL PROTECTED] Programmers don't die, they just GOSUB without RETURN. ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ sqlobject-discuss mailing list sqlobject-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss