mirror of
https://github.com/python/cpython.git
synced 2025-11-13 07:26:31 +00:00
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.
This commit is contained in:
commit
3b12e957a7
2 changed files with 12 additions and 3 deletions
|
|
@ -10,6 +10,12 @@ Release date: 2015-04-24
|
||||||
Core and Builtins
|
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 #2292: PEP 448: Additional Unpacking Generalizations.
|
||||||
|
|
||||||
- Issue #24096: Make warnings.warn_explicit more robust against mutation of the
|
- Issue #24096: Make warnings.warn_explicit more robust against mutation of the
|
||||||
|
|
|
||||||
|
|
@ -1241,6 +1241,9 @@ PyObject* pysqlite_connection_call(pysqlite_Connection* self, PyObject* args, Py
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_PyArg_NoKeywords(MODULE_NAME ".Connection()", kwargs))
|
||||||
|
return NULL;
|
||||||
|
|
||||||
if (!PyArg_ParseTuple(args, "O", &sql))
|
if (!PyArg_ParseTuple(args, "O", &sql))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
|
@ -1287,7 +1290,7 @@ error:
|
||||||
return NULL;
|
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* cursor = 0;
|
||||||
PyObject* result = 0;
|
PyObject* result = 0;
|
||||||
|
|
@ -1316,7 +1319,7 @@ error:
|
||||||
return cursor;
|
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* cursor = 0;
|
||||||
PyObject* result = 0;
|
PyObject* result = 0;
|
||||||
|
|
@ -1345,7 +1348,7 @@ error:
|
||||||
return cursor;
|
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* cursor = 0;
|
||||||
PyObject* result = 0;
|
PyObject* result = 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue