]> granicus.if.org Git - python/commitdiff
Issue #20274: When calling a _sqlite.Connection, it now complains if passed
authorLarry Hastings <larry@hastings.org>
Fri, 8 May 2015 14:45:10 +0000 (07:45 -0700)
committerLarry Hastings <larry@hastings.org>
Fri, 8 May 2015 14:45:10 +0000 (07:45 -0700)
any keyword arguments.  Previously it silently ignored them.

Also: merge related change from 3.4, also reported on Issue #20274.

1  2 
Misc/NEWS
Modules/_sqlite/connection.c

diff --cc Misc/NEWS
index 9e007b45ad0cdd2311263fb83254b3961a50d059,d01f52533f006c03351a98b553f838a1a05ea057..782bc698b90f3e273e33d307ae299b81e511cdfc
+++ 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.
  
index 2e8cab5554be638d687fb1ce2c077cc4423d93d8,d3903286c8170de944c60d07d2dc1866be03e47b..a08ebfe8c47447f64461d73cf58d23c8258c5468
@@@ -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;