Allowed using the sqlite3 backend as much as possible without _sqlite3.
The inner import was dropped during the reorganizing of the database
backends in commit 28308078f3
.
This commit is contained in:
parent
17b1f7886c
commit
95058606c8
|
@ -1,4 +1,3 @@
|
||||||
import _sqlite3 # isort:skip
|
|
||||||
import codecs
|
import codecs
|
||||||
import contextlib
|
import contextlib
|
||||||
import copy
|
import copy
|
||||||
|
@ -34,6 +33,10 @@ class DatabaseSchemaEditor(BaseDatabaseSchemaEditor):
|
||||||
c.execute('PRAGMA foreign_keys = %s' % int(self._initial_pragma_fk))
|
c.execute('PRAGMA foreign_keys = %s' % int(self._initial_pragma_fk))
|
||||||
|
|
||||||
def quote_value(self, value):
|
def quote_value(self, value):
|
||||||
|
# The backend "mostly works" without this function and there are use
|
||||||
|
# cases for compiling Python without the sqlite3 libraries (e.g.
|
||||||
|
# security hardening).
|
||||||
|
import _sqlite3
|
||||||
try:
|
try:
|
||||||
value = _sqlite3.adapt(value)
|
value = _sqlite3.adapt(value)
|
||||||
except _sqlite3.ProgrammingError:
|
except _sqlite3.ProgrammingError:
|
||||||
|
|
Loading…
Reference in New Issue