From: Larry Hastings Date: Fri, 8 May 2015 14:45:10 +0000 (-0700) Subject: Issue #20274: When calling a _sqlite.Connection, it now complains if passed X-Git-Tag: v3.5.0b1~225 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3b12e957a70b52d7a7123298a1a0a27fccf392da;p=python 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. --- 3b12e957a70b52d7a7123298a1a0a27fccf392da diff --cc Misc/NEWS index 9e007b45ad,d01f52533f..782bc698b9 --- a/Misc/NEWS +++ b/Misc/NEWS @@@ -10,8 -10,9 +10,14 @@@ Release date: 2015-04-2 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 #2292: PEP 448: Additional Unpacking Generalizations. + - Issue #24096: Make warnings.warn_explicit more robust against mutation of the warnings.filters list. diff --cc Modules/_sqlite/connection.c index 2e8cab5554,d3903286c8..a08ebfe8c4 --- a/Modules/_sqlite/connection.c +++ b/Modules/_sqlite/connection.c @@@ -1241,6 -1241,6 +1241,9 @@@ PyObject* pysqlite_connection_call(pysq return NULL; } ++ if (!_PyArg_NoKeywords(MODULE_NAME ".Connection()", kwargs)) ++ return NULL; ++ if (!PyArg_ParseTuple(args, "O", &sql)) return NULL;