Skip to content

Commit

Permalink
bpo-43314: Remove SQLITE_OPEN_URI ifdef (GH-24637)
Browse files Browse the repository at this point in the history
SQLite 3.7.15 is required as by GH-24106. SQLITE_OPEN_URI was added in
SQLite 3.7.7.
  • Loading branch information
Erlend Egeberg Aasland authored Feb 26, 2021
1 parent 91ea37c commit 3150754
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions Modules/_sqlite/connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3150754

Please sign in to comment.