diff options
author | Berker Peksag <berker.peksag@gmail.com> | 2016-06-12 11:09:51 (GMT) |
---|---|---|
committer | Berker Peksag <berker.peksag@gmail.com> | 2016-06-12 11:09:51 (GMT) |
commit | 7bea2347c7e8af2c6b59e541c4039c34c7a8f6b2 (patch) | |
tree | 43b082adfa798c7ba87552edbdca905bd8f8c3a2 /Modules | |
parent | c415440faa67c488fd2a5d8fc0977cbd660c4a90 (diff) | |
download | cpython-7bea2347c7e8af2c6b59e541c4039c34c7a8f6b2.zip cpython-7bea2347c7e8af2c6b59e541c4039c34c7a8f6b2.tar.gz cpython-7bea2347c7e8af2c6b59e541c4039c34c7a8f6b2.tar.bz2 |
Issue #27190: Raise NotSupportedError if sqlite3 is older than 3.3.1
Patch by Dave Sawyer.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_sqlite/connection.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c index 7570624..6aa4764 100644 --- a/Modules/_sqlite/connection.c +++ b/Modules/_sqlite/connection.c @@ -164,6 +164,10 @@ int pysqlite_connection_init(pysqlite_Connection* self, PyObject* args, PyObject #ifdef WITH_THREAD self->thread_ident = PyThread_get_thread_ident(); #endif + if (!check_same_thread && sqlite3_libversion_number() < 3003001) { + PyErr_SetString(pysqlite_NotSupportedError, "shared connections not available"); + return -1; + } self->check_same_thread = check_same_thread; self->function_pinboard = PyDict_New(); |