10000 bpo-42972: Track sqlite3 statement objects by erlend-aasland · Pull Request #26475 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-42972: Track sqlite3 statement objects #26475

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 1, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Improve error message
Co-authored-by: Victor Stinner <vstinner@python.org>
  • Loading branch information
Erlend Egeberg Aasland and vstinner committed Jun 1, 2021
commit df284eb0efd77d962e64e977bbf499bbf254ec80
5 changes: 3 additions & 2 deletions Modules/_sqlite/statement.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,9 @@ pysqlite_statement_create(pysqlite_Connection *connection, PyObject *sql)

sql_cstr = PyUnicode_AsUTF8AndSize(sql, &sql_cstr_len);
if (sql_cstr == NULL) {
PyErr_SetString(pysqlite_Warning,
"SQL is of wrong type. Must be string.");
PyErr_Format(pysqlite_Warning,
"SQL is of wrong type ('%s'). Must be string.",
Py_TYPE(sql)->tp_name);
return NULL;
}
if (strlen(sql_cstr) != (size_t)sql_cstr_len) {
Expand Down
0