Rev 414: Warn about versions of sqlite that are too old. in http://people.samba.org/bzr/jelmer/bzr-svn/bzr.dev

Jelmer Vernooij jelmer at samba.org
Wed Jan 24 14:19:45 GMT 2007


------------------------------------------------------------
revno: 414
revision-id: jelmer at samba.org-20070124141927-dksr08au224gomps
parent: jelmer at samba.org-20070124125639-8h9p6y3peumfb9p3
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: main
timestamp: Wed 2007-01-24 15:19:27 +0100
message:
  Warn about versions of sqlite that are too old.
modified:
  __init__.py                    __init__.py-20051008155114-eae558e6cf149e1d
=== modified file '__init__.py'
--- a/__init__.py	2007-01-24 12:56:39 +0000
+++ b/__init__.py	2007-01-24 14:19:27 +0000
@@ -74,11 +74,17 @@
         try:
             import sqlite3
         except ImportError:
-            from pysqlite2 import dbapi2 
+            from pysqlite2 import dbapi2 as sqlite3
     except:
         warning('Needs at least Python2.5 or Python2.4 with the pysqlite2 module')
         raise bzrlib.errors.BzrError("missing sqlite library")
 
+    if (sqlite3.sqlite_version_info[0] < 3 or 
+            (sqlite3.sqlite_version_info[0] == 3 and 
+             sqlite3.sqlite_version_info[1] < 3)):
+        warning('Needs at least sqlite 3.3.x')
+        raise bzrlib.errors.BzrError("incompatible sqlite library")
+
 check_bzrlib_version(required_bzr_version)
 check_subversion_version()
 check_pysqlite_version()




More information about the bazaar-commits mailing list