Skip to content

Commit 3150754

Browse files
author
Erlend Egeberg Aasland
authored
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.
1 parent 91ea37c commit 3150754

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

Modules/_sqlite/connection.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -102,21 +102,10 @@ pysqlite_connection_init(pysqlite_Connection *self, PyObject *args,
102102
Py_INCREF(&PyUnicode_Type);
103103
Py_XSETREF(self->text_factory, (PyObject*)&PyUnicode_Type);
104104

105-
#ifdef SQLITE_OPEN_URI
106105
Py_BEGIN_ALLOW_THREADS
107106
rc = sqlite3_open_v2(database, &self->db,
108107
SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE |
109108
(uri ? SQLITE_OPEN_URI : 0), NULL);
110-
#else
111-
if (uri) {
112-
PyErr_SetString(pysqlite_NotSupportedError, "URIs not supported");
113-
return -1;
114-
}
115-
Py_BEGIN_ALLOW_THREADS
116-
/* No need to use sqlite3_open_v2 as sqlite3_open(filename, db) is the
117-
same as sqlite3_open_v2(filename, db, SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE, NULL). */
118-
rc = sqlite3_open(database, &self->db);
119-
#endif
120109
Py_END_ALLOW_THREADS
121110

122111
Py_DECREF(database_obj);

0 commit comments

Comments
 (0)