mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
gh-117995: Don't raise DeprecationWarnings for indexed nameless params (#118001)
Filter out '?NNN' placeholders when looking for named params. Co-authored-by: AN Long <aisk@users.noreply.github.com>
This commit is contained in:
parent
8b541c017e
commit
550483b7e6
3 changed files with 17 additions and 1 deletions
|
@ -669,7 +669,7 @@ bind_parameters(pysqlite_state *state, pysqlite_Statement *self,
|
|||
}
|
||||
for (i = 0; i < num_params; i++) {
|
||||
const char *name = sqlite3_bind_parameter_name(self->st, i+1);
|
||||
if (name != NULL) {
|
||||
if (name != NULL && name[0] != '?') {
|
||||
int ret = PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
|
||||
"Binding %d ('%s') is a named parameter, but you "
|
||||
"supplied a sequence which requires nameless (qmark) "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue