]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- import of py2.5s sqlite3 [ticket:293]
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 4 Sep 2006 02:22:00 +0000 (02:22 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 4 Sep 2006 02:22:00 +0000 (02:22 +0000)
CHANGES
lib/sqlalchemy/databases/sqlite.py

diff --git a/CHANGES b/CHANGES
index f99cd35460c99f81fd836193e47ea38fd15af42a..24898b02750ea3b592adec9d64802f0d2ff6a870 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -63,6 +63,7 @@ against datetimes that dont).
 - fix to using query.count() with distinct, **kwargs with SelectResults
 count() [ticket:287]
 - deregister Table from MetaData when autoload fails; [ticket:289]
+- import of py2.5s sqlite3 [ticket:293]
 
 0.2.7
 - quoting facilities set up so that database-specific quoting can be
index 7acc0488080ff9947d8f66d7a6b4b44116f586d3..2039e37e6eb922c5a966d8438cd229b76c967abe 100644 (file)
@@ -16,11 +16,14 @@ pysqlite2_timesupport = False   # Change this if the init.d guys ever get around
 
 try:
     from pysqlite2 import dbapi2 as sqlite
-except:
+except ImportError:
     try:
-        sqlite = __import__('sqlite') # skip ourselves
-    except:
-        sqlite = None
+        from sqlite3 import dbapi2 as sqlite #try the 2.5+ stdlib name.
+    except ImportError:
+        try:
+            sqlite = __import__('sqlite') # skip ourselves
+        except:
+            sqlite = None
 
 class SLNumeric(sqltypes.Numeric):
     def get_col_spec(self):