[Python-checkins] bpo-44165: pysqlite_statement_create now returns a Py object, not an int (GH-26484)
pablogsal
webhook-mailer at python.org
Wed Jun 2 09:22:24 EDT 2021
https://github.com/python/cpython/commit/fbf25b8c0dd1e62db59117d53bbd2d4131a06867
commit: fbf25b8c0dd1e62db59117d53bbd2d4131a06867
branch: main
author: Erlend Egeberg Aasland <erlend.aasland at innova.no>
committer: pablogsal <Pablogsal at gmail.com>
date: 2021-06-02T14:22:15+01:00
summary:
bpo-44165: pysqlite_statement_create now returns a Py object, not an int (GH-26484)
GH-26206 was broken by GH-26475.
files:
M Modules/_sqlite/statement.c
diff --git a/Modules/_sqlite/statement.c b/Modules/_sqlite/statement.c
index c4a790c424e35..c86645ad42b64 100644
--- a/Modules/_sqlite/statement.c
+++ b/Modules/_sqlite/statement.c
@@ -70,7 +70,7 @@ pysqlite_statement_create(pysqlite_Connection *connection, PyObject *sql)
int max_length = sqlite3_limit(connection->db, SQLITE_LIMIT_LENGTH, -1);
if (sql_cstr_len >= max_length) {
PyErr_SetString(pysqlite_DataError, "query string is too large");
- return PYSQLITE_TOO_MUCH_SQL;
+ return NULL;
}
if (strlen(sql_cstr) != (size_t)sql_cstr_len) {
PyErr_SetString(PyExc_ValueError,
More information about the Python-checkins
mailing list