Commits

Mike Bayer  committed 28a7d93

- import of py2.5s sqlite3 [ticket:293]

  • Participants
  • Parent commits a845309

Comments (0)

Files changed (2)

 - 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

File lib/sqlalchemy/databases/sqlite.py

 
 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):