From 026a3952e0223194f0e1ca3f4ae862048e7a907a Mon Sep 17 00:00:00 2001 From: Jonathan Ellis Date: Fri, 1 Jun 2007 04:52:35 +0000 Subject: [PATCH] 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 --- lib/sqlalchemy/databases/sqlite.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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: -- 2.47.2