mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
bpo-31843: sqlite3.connect() now accepts PathLike objects as database name (#4299)
This commit is contained in:
parent
edb13ae48c
commit
a22a127458
5 changed files with 32 additions and 7 deletions
|
|
@ -55,7 +55,7 @@ static PyObject* module_connect(PyObject* self, PyObject* args, PyObject*
|
|||
"check_same_thread", "factory", "cached_statements", "uri",
|
||||
NULL
|
||||
};
|
||||
char* database;
|
||||
PyObject* database;
|
||||
int detect_types = 0;
|
||||
PyObject* isolation_level;
|
||||
PyObject* factory = NULL;
|
||||
|
|
@ -66,7 +66,7 @@ static PyObject* module_connect(PyObject* self, PyObject* args, PyObject*
|
|||
|
||||
PyObject* result;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s|diOiOip", kwlist,
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|diOiOip", kwlist,
|
||||
&database, &timeout, &detect_types,
|
||||
&isolation_level, &check_same_thread,
|
||||
&factory, &cached_statements, &uri))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue