]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
include current versions in warning messages. simplify sqlite_ver test; if a tuple...
authorJonathan Ellis <jbellis@gmail.com>
Fri, 1 Jun 2007 04:52:35 +0000 (04:52 +0000)
committerJonathan Ellis <jbellis@gmail.com>
Fri, 1 Jun 2007 04:52:35 +0000 (04:52 +0000)
lib/sqlalchemy/databases/sqlite.py

index 1876305235620cb69061e238999a2d193bf78713..7c5cbccbe5b725a60a48907fe4da2723a0502abf 100644 (file)
@@ -151,10 +151,10 @@ class SQLiteDialect(ansisql.ANSIDialect):
         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,2) and sqlite_ver != (2,1,'3'):
-                warnings.warn(RuntimeWarning("The installed version of pysqlite2 is out-dated, and will cause errors in some cases.  Version 2.1.3 or greater is recommended."))
+            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 is out-dated, and will cause errors in some cases.  Version 3.3.13 or greater is recommended."))
+                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))
         
     def dbapi(cls):
         try: