summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErlend Egeberg Aasland <erlend.aasland@innova.no>2021-02-26 00:48:19 (GMT)
committerGitHub <noreply@github.com>2021-02-26 00:48:19 (GMT)
commit3150754f91fc1d15e3888e22c065672838a9c069 (patch)
tree140dd77c8d4585bde32bfbf3f273a2e9a5a2f382
parent91ea37c84af2dd5ea92802a4c2adad47861ac067 (diff)
downloadcpython-3150754f91fc1d15e3888e22c065672838a9c069.zip
cpython-3150754f91fc1d15e3888e22c065672838a9c069.tar.gz
cpython-3150754f91fc1d15e3888e22c065672838a9c069.tar.bz2
bpo-43314: Remove SQLITE_OPEN_URI ifdef (GH-24637)
SQLite 3.7.15 is required as by GH-24106. SQLITE_OPEN_URI was added in SQLite 3.7.7.
-rw-r--r--Modules/_sqlite/connection.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c
index f6a6ef6..53d358e 100644
--- a/Modules/_sqlite/connection.c
+++ b/Modules/_sqlite/connection.c
@@ -102,21 +102,10 @@ pysqlite_connection_init(pysqlite_Connection *self, PyObject *args,
Py_INCREF(&PyUnicode_Type);
Py_XSETREF(self->text_factory, (PyObject*)&PyUnicode_Type);
-#ifdef SQLITE_OPEN_URI
Py_BEGIN_ALLOW_THREADS
rc = sqlite3_open_v2(database, &self->db,
SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE |
(uri ? SQLITE_OPEN_URI : 0), NULL);
-#else
- if (uri) {
- PyErr_SetString(pysqlite_NotSupportedError, "URIs not supported");
- return -1;
- }
- Py_BEGIN_ALLOW_THREADS
- /* No need to use sqlite3_open_v2 as sqlite3_open(filename, db) is the
- same as sqlite3_open_v2(filename, db, SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE, NULL). */
- rc = sqlite3_open(database, &self->db);
-#endif
Py_END_ALLOW_THREADS
Py_DECREF(database_obj);