mirror of
https://github.com/python/cpython.git
synced 2025-10-17 20:28:43 +00:00
bpo-37406: sqlite3 raises TypeError for wrong operation type (GH-14386)
The sqlite3 module now raises TypeError, rather than ValueError, if operation argument type is not str: execute(), executemany() and calling a connection.
This commit is contained in:
parent
ed076ed467
commit
c6a2320e87
6 changed files with 11 additions and 16 deletions
|
@ -1223,7 +1223,7 @@ PyObject* pysqlite_connection_call(pysqlite_Connection* self, PyObject* args, Py
|
|||
if (!_PyArg_NoKeywords(MODULE_NAME ".Connection", kwargs))
|
||||
return NULL;
|
||||
|
||||
if (!PyArg_ParseTuple(args, "O", &sql))
|
||||
if (!PyArg_ParseTuple(args, "U", &sql))
|
||||
return NULL;
|
||||
|
||||
_pysqlite_drop_unused_statement_references(self);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue