Import pysqlite3 if available, closes #360 (#361)

This commit is contained in:
Simon Willison 2018-08-15 17:58:56 -07:00 committed by GitHub
commit aae49fef3b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 18 additions and 10 deletions

View file

@ -9,13 +9,17 @@ import os
import pkg_resources
import re
import shlex
import sqlite3
import tempfile
import time
import shutil
import urllib
import numbers
try:
import pysqlite3 as sqlite3
except ImportError:
import sqlite3
# From https://www.sqlite.org/lang_keywords.html
reserved_words = set((
'abort action add after all alter analyze and as asc attach autoincrement '