-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
Closed
Labels
3.11only security fixesonly security fixes3.12only security fixesonly security fixestopic-sqlite3type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
import sqlite3
def dict_factory(cursor, row):
d = {}
for idx, col in enumerate(cursor.description):
d[col[0]] = row[idx]
return d
def main():
conn = sqlite3.connect(":memory:")
cur = conn.cursor()
# conn.row_factory = sqlite3.Row # is ok
conn.row_factory = dict_factory # is fail
cur.executescript("""
create table if not exists test(
id integer primary key AUTOINCREMENT
);
""")
cur.close()
for line in conn.iterdump():
print(line)
main()
CPython versions tested on:
3.12
Operating systems tested on:
Windows
Linked PRs
Metadata
Metadata
Assignees
Labels
3.11only security fixesonly security fixes3.12only security fixesonly security fixestopic-sqlite3type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error