cpython: 3e9f4f3c7fa7 (original) (raw)

Mercurial > cpython

changeset 95916:3e9f4f3c7fa7

Issue #20274: When calling a _sqlite.Connection, it now complains if passed any keyword arguments. Previously it silently ignored them. Also: merge related change from 3.4, also reported on Issue #20274. [#20274]

Larry Hastings larry@hastings.org
date Fri, 08 May 2015 07:45:10 -0700
parents a3ee6990daea(current diff)4c860369b6c2(diff)
children b9b772a91db0
files Misc/NEWS Modules/_sqlite/connection.c
diffstat 2 files changed, 12 insertions(+), 3 deletions(-)[+] [-] Misc/NEWS 6 Modules/_sqlite/connection.c 9

line wrap: on

line diff

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -10,6 +10,12 @@ Release date: 2015-04-24 Core and Builtins ----------------- +- Issue #20274: When calling a _sqlite.Connection, it now complains if passed

--- a/Modules/_sqlite/connection.c +++ b/Modules/_sqlite/connection.c @@ -1241,6 +1241,9 @@ PyObject* pysqlite_connection_call(pysql return NULL; }

+ if (!PyArg_ParseTuple(args, "O", &sql)) return NULL; @@ -1287,7 +1290,7 @@ error: return NULL; } -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; @@ -1316,7 +1319,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; @@ -1345,7 +1348,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;