Issue #20274: When calling a _sqlite.Connection, it now complains if passed
any keyword arguments. Previously it silently ignored them. Also: Remove
ignored and erroneous "kwargs" parameters from three METH_VARARGS methods
on _sqlite.Connection.
diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c
index 0ed196d..79a7a00 100644
--- a/Modules/_sqlite/connection.c
+++ b/Modules/_sqlite/connection.c
@@ -1192,6 +1192,9 @@
return NULL;
}
+ if (!_PyArg_NoKeywords(MODULE_NAME ".Connection()", kwargs))
+ return NULL;
+
if (!PyArg_ParseTuple(args, "O", &sql)) {
return NULL;
}
@@ -1242,7 +1245,7 @@
return (PyObject*)statement;
}
-PyObject* pysqlite_connection_execute(pysqlite_Connection* self, PyObject* args, PyObject* kwargs)
+PyObject* pysqlite_connection_execute(pysqlite_Connection* self, PyObject* args)
{
PyObject* cursor = 0;
PyObject* result = 0;
@@ -1271,7 +1274,7 @@
return cursor;
}
-PyObject* pysqlite_connection_executemany(pysqlite_Connection* self, PyObject* args, PyObject* kwargs)
+PyObject* pysqlite_connection_executemany(pysqlite_Connection* self, PyObject* args)
{
PyObject* cursor = 0;
PyObject* result = 0;
@@ -1300,7 +1303,7 @@
return cursor;
}
-PyObject* pysqlite_connection_executescript(pysqlite_Connection* self, PyObject* args, PyObject* kwargs)
+PyObject* pysqlite_connection_executescript(pysqlite_Connection* self, PyObject* args)
{
PyObject* cursor = 0;
PyObject* result = 0;