[z3-checkins] r18699 - z3/sqlos/trunk
andres at codespeak.net
andres at codespeak.net
Mon Oct 17 10:34:26 CEST 2005
Author: andres
Date: Mon Oct 17 10:34:26 2005
New Revision: 18699
Modified:
z3/sqlos/trunk/adapter.py
Log:
Made the the Postgres and sqlite adapters define .module. This is sometimes needed with sqlobject 0.6 and needed uppon startup on 0.7rc1
Modified: z3/sqlos/trunk/adapter.py
==============================================================================
--- z3/sqlos/trunk/adapter.py (original)
+++ z3/sqlos/trunk/adapter.py Mon Oct 17 10:34:26 2005
@@ -65,11 +65,21 @@
class PostgresAdapter(ConnectionAdapter, _postgres.builder()):
def __init__(self, connection):
+ #The import is needed, as sqlobject uses self.module.Binary uppon
+ #startup. But until now we dont define .module. There is definitely
+ #need for a better solution. Propably the other adapters need this as
+ #well, but i cant test them, as i dont have them.
+ #Andres Freund - 2005-10-17
+ import psycopg
+ self.module=psycopg
super(PostgresAdapter, self).__init__(connection)
self.supportTransactions = True
class SQLiteAdapter(ConnectionAdapter, _sqlite.builder()):
def __init__(self, connection):
+ #see above
+ import sqlite
+ self.module = sqlite
super(SQLiteAdapter, self).__init__(connection)
self.supportTransactions = True
More information about the z3-checkins
mailing list