]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
rearrange sqlite dialect initialization to be able to warn about pysqlite1 being...
authorAnts Aasma <ants.aasma@gmail.com>
Sat, 14 Jul 2007 12:53:18 +0000 (12:53 +0000)
committerAnts Aasma <ants.aasma@gmail.com>
Sat, 14 Jul 2007 12:53:18 +0000 (12:53 +0000)
CHANGES
lib/sqlalchemy/databases/sqlite.py

diff --git a/CHANGES b/CHANGES
index 94a925cae67cf97d3204ad5f67c1ed682d7f29c7..0a1990ea1b1230831ef16631486f6ff7df0ab3f4 100644 (file)
--- a/CHANGES
+++ b/CHANGES
     - the fix in "schema" above fixes reflection of foreign keys from an
       alt-schema table to a public schema table
 - sqlite
+    - rearranged dialect initialization so it has time to warn about pysqlite1
+      being too old.
     - sqlite better handles datetime/date/time objects mixed and matched
       with various Date/Time/DateTime columns
     - string PK column inserts dont get overwritten with OID [ticket:603] 
index 8e776fb26ed7e81bc4fa17b0d5a8dea8030e6dc0..b42468c7a4874dd38939f415029e86c59b412dce 100644 (file)
@@ -159,13 +159,13 @@ class SQLiteDialect(ansisql.ANSIDialect):
         ansisql.ANSIDialect.__init__(self, default_paramstyle='qmark', **kwargs)
         def vers(num):
             return tuple([int(x) for x in num.split('.')])
-        self.supports_cast = (self.dbapi is None or vers(self.dbapi.sqlite_version) >= vers("3.2.3"))
         if self.dbapi is not None:
             sqlite_ver = self.dbapi.version_info
             if sqlite_ver < (2,1,'3'):
                 warnings.warn(RuntimeWarning("The installed version of pysqlite2 (%s) is out-dated, and will cause errors in some cases.  Version 2.1.3 or greater is recommended." % '.'.join([str(subver) for subver in sqlite_ver])))
             if vers(self.dbapi.sqlite_version) < vers("3.3.13"):
                 warnings.warn(RuntimeWarning("The installed version of sqlite (%s) is out-dated, and will cause errors in some cases.  Version 3.3.13 or greater is recommended." % self.dbapi.sqlite_version))
+        self.supports_cast = (self.dbapi is None or vers(self.dbapi.sqlite_version) >= vers("3.2.3"))
         
     def dbapi(cls):
         try: