From 09c5f96bd6a308a79167276798010adf45ff6127 2012-12-24 08:10:22 From: Skylar Saveland Date: 2012-12-24 08:10:22 Subject: [PATCH] try to fallback to pysqlite2.dbapi2 as sqlite3 for situations where Python is built without sqlite3 and can not easily be changed, it would be nice to still be able to get history with pysqlite2. --- diff --git a/IPython/core/history.py b/IPython/core/history.py index 558e517..e840200 100644 --- a/IPython/core/history.py +++ b/IPython/core/history.py @@ -20,7 +20,10 @@ import re try: import sqlite3 except ImportError: - sqlite3 = None + try: + from pysqlite2 import dbapi2 as sqlite3 + except ImportError: + sqlite3 = None import threading # Our own packages