diff options
author | Larry Hastings <larry@hastings.org> | 2015-05-08 14:45:10 (GMT) |
---|---|---|
committer | Larry Hastings <larry@hastings.org> | 2015-05-08 14:45:10 (GMT) |
commit | 3b12e957a70b52d7a7123298a1a0a27fccf392da (patch) | |
tree | 19fb0b80e6186b8cdea76f1ae15ba188a7806e6d /Modules | |
parent | 809325459750897bedd393893869a076fa6655a6 (diff) | |
parent | 01b08836021809de5423410f606495a2551f2aef (diff) | |
download | cpython-3b12e957a70b52d7a7123298a1a0a27fccf392da.zip cpython-3b12e957a70b52d7a7123298a1a0a27fccf392da.tar.gz cpython-3b12e957a70b52d7a7123298a1a0a27fccf392da.tar.bz2 |
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.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_sqlite/connection.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c index 2e8cab5..a08ebfe 100644 --- a/Modules/_sqlite/connection.c +++ b/Modules/_sqlite/connection.c @@ -1241,6 +1241,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; @@ -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; |