summaryrefslogtreecommitdiff
path: root/Modules/_sqlite/connection.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-06-26 03:16:24 +0200
committerGitHub <noreply@github.com>2019-06-26 03:16:24 +0200
commitc6a2320e876354ee62cf8149b849bcff9492d38a (patch)
treed5f5042334eb149bf08a01e7f09b429db0360ff2 /Modules/_sqlite/connection.c
parented076ed467264b43ed01a8223ca65b133b590919 (diff)
downloadcpython-git-c6a2320e876354ee62cf8149b849bcff9492d38a.tar.gz
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.
Diffstat (limited to 'Modules/_sqlite/connection.c')
-rw-r--r--Modules/_sqlite/connection.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c
index 0d6462ef7d..5ceeaf98ee 100644
--- a/Modules/_sqlite/connection.c
+++ b/Modules/_sqlite/connection.c
@@ -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);