[New-bugs-announce] [issue41829] sqlite3.Row always read as tuple when supplied to executemany

Tony Wu report at bugs.python.org
Mon Sep 21 20:43:13 EDT 2020


New submission from Tony Wu <tonywuyt126 at gmail.com>:

Supplying a sequence or sqlite3.Row objects to sqlite3.Connection.executemany will cause the Row objects to be interpreted as Sequences instead of Mappings even if the statement to be executed uses named parameter substitution.

That is, values in the Rows are accessed using their numerical indices instead of column names.

This script demonstrate how this is unexpected behavior.

Issue found in Python 3.8.5 and 3.7.6.

----------
components: Extension Modules
files: row_substitution.py
messages: 377295
nosy: tony.wu
priority: normal
severity: normal
status: open
title: sqlite3.Row always read as tuple when supplied to executemany
type: behavior
versions: Python 3.8
Added file: https://bugs.python.org/file49471/row_substitution.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41829>
_______________________________________


More information about the New-bugs-announce mailing list