Kaydet (Commit) 101b054c authored tarafından Larry Hastings's avatar Larry Hastings

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.
üst 2e2dcf6e
......@@ -10,6 +10,12 @@ What's New in Python 2.7.10?
Core and Builtins
-----------------
- Issue #20274: When calling a _sqlite.Connection, it now complains if passed
any keyword arguments. Previously it silently ignored them.
- Issue #20274: Remove ignored and erroneous "kwargs" parameters from three
METH_VARARGS methods on _sqlite.Connection.
- Issue #23629: Fix the default __sizeof__ implementation for variable-sized
objects.
......
......@@ -1192,6 +1192,9 @@ PyObject* pysqlite_connection_call(pysqlite_Connection* self, PyObject* args, Py
return NULL;
}
if (!_PyArg_NoKeywords(MODULE_NAME ".Connection()", kwargs))
return NULL;
if (!PyArg_ParseTuple(args, "O", &sql)) {
return NULL;
}
......@@ -1242,7 +1245,7 @@ error:
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 @@ error:
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 @@ error:
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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment