mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-118406: Add signature for sqlite3.Connection objects (#118428)
This commit is contained in:
parent
19d468a3ab
commit
b568c2c1ff
3 changed files with 13 additions and 0 deletions
|
@ -2561,6 +2561,12 @@ set_autocommit(pysqlite_Connection *self, PyObject *val, void *Py_UNUSED(ctx))
|
|||
return 0;
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
get_sig(PyObject *self, void *Py_UNUSED(ctx))
|
||||
{
|
||||
return PyUnicode_FromString("(sql, /)");
|
||||
}
|
||||
|
||||
|
||||
static const char connection_doc[] =
|
||||
PyDoc_STR("SQLite database connection object.");
|
||||
|
@ -2570,6 +2576,7 @@ static PyGetSetDef connection_getset[] = {
|
|||
{"total_changes", (getter)pysqlite_connection_get_total_changes, (setter)0},
|
||||
{"in_transaction", (getter)pysqlite_connection_get_in_transaction, (setter)0},
|
||||
{"autocommit", (getter)get_autocommit, (setter)set_autocommit},
|
||||
{"__text_signature__", get_sig, (setter)0},
|
||||
{NULL}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue