From: Jonathan Ellis Date: Fri, 1 Jun 2007 04:52:35 +0000 (+0000) Subject: include current versions in warning messages. simplify sqlite_ver test; if a tuple... X-Git-Tag: rel_0_3_8~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=026a3952e0223194f0e1ca3f4ae862048e7a907a;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git include current versions in warning messages. simplify sqlite_ver test; if a tuple is less than 2,1,3 it is also less than 2,2 --- diff --git a/lib/sqlalchemy/databases/sqlite.py b/lib/sqlalchemy/databases/sqlite.py index 1876305235..7c5cbccbe5 100644 --- a/lib/sqlalchemy/databases/sqlite.py +++ b/lib/sqlalchemy/databases/sqlite.py @@ -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: