diff options
author | Erlend E. Aasland <erlend@python.org> | 2024-04-22 06:43:20 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-22 06:43:20 (GMT) |
commit | 550483b7e6c54b2a25d4db0c4ca41bd9c1132f93 (patch) | |
tree | 59f9a2728b38577ea34cde735dabc4bf68e6cfb5 /Modules/_sqlite | |
parent | 8b541c017ea92040add608b3e0ef8dc85e9e6060 (diff) | |
download | cpython-550483b7e6c54b2a25d4db0c4ca41bd9c1132f93.zip cpython-550483b7e6c54b2a25d4db0c4ca41bd9c1132f93.tar.gz cpython-550483b7e6c54b2a25d4db0c4ca41bd9c1132f93.tar.bz2 |
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>
Diffstat (limited to 'Modules/_sqlite')
-rw-r--r-- | Modules/_sqlite/cursor.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_sqlite/cursor.c b/Modules/_sqlite/cursor.c index f95df61..950596e 100644 --- a/Modules/_sqlite/cursor.c +++ b/Modules/_sqlite/cursor.c @@ -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) " |