[sqlite] disable python's "same thread" check for sqlite3 connections

Let's not cater for "older" (whatever that means) sqlite3 libraries. Closes #240184

authorJulien Cristau <julien.cristau@logilab.fr>
changeset7ba2d6d697ca
branchdefault
phasepublic
hiddenno
parent revision#3a5b023703e8 Added tag logilab-database-version-1.12.0, logilab-database-debian-version-1.12.0-1, logilab-database-centos-version-1.12.0-1 for changeset d9353d753de1
child revision#7e173bedaecc [pkg] 1.12.1
files modified by this revision
sqlite.py
# HG changeset patch
# User Julien Cristau <julien.cristau@logilab.fr>
# Date 1398177258 -7200
# Tue Apr 22 16:34:18 2014 +0200
# Node ID 7ba2d6d697ca3de7e03d68369069b0d9d40bf361
# Parent 3a5b023703e86b57037df50ce83199370ad43ae8
[sqlite] disable python's "same thread" check for sqlite3 connections

Let's not cater for "older" (whatever that means) sqlite3 libraries.
Closes #240184

diff --git a/sqlite.py b/sqlite.py
@@ -180,11 +180,11 @@
1                  return getattr(self._cnx, attrname)
2 
3          # abspath so we can change cwd without breaking further queries on the
4          # database
5          cnx = sqlite.connect(abspath(database),
6 -                             detect_types=sqlite.PARSE_DECLTYPES)
7 +                             detect_types=sqlite.PARSE_DECLTYPES, check_same_thread=False)
8          return self._wrap_if_needed(Sqlite3CnxWrapper(cnx))
9 
10      def _transformation_callback(self, description, encoding='utf-8', binarywrap=None):
11          def _transform(value):
12              if binarywrap is not None and isinstance(value, self._native_module.Binary):