This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: sqlite3.Row always read as tuple when supplied to executemany
Type: behavior Stage:
Components: Extension Modules Versions: Python 3.8
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: ghaering, tony.wu
Priority: normal Keywords:

Created on 2020-09-22 00:43 by tony.wu, last changed 2022-04-11 14:59 by admin.

Files
File name Uploaded Description Edit
row_substitution.py tony.wu, 2020-09-22 00:43 A script that demonstrates the unexpected behavior
Messages (1)
msg377295 - (view) Author: Tony Wu (tony.wu) * Date: 2020-09-22 00:43
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.
History
Date User Action Args
2022-04-11 14:59:35adminsetgithub: 85995
2020-09-22 00:52:26tony.wusetnosy: + ghaering
2020-09-22 00:43:13tony.wucreate