-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gh-118221: Always use the default row factory in sqlite3.iterdump() #118223
gh-118221: Always use the default row factory in sqlite3.iterdump() #118223
Conversation
…mp() The iterdump() implementation depends on the row factory returning resulting rows as tuples; it will fail with custom row factories like for example a dict factory. Fixed by overriding the row factory of the cursor used by iterdump(). FTR, this does not affect the row factory of the parent connection.
@kesry, can you see if this patch works for you? |
cc. @felixxm who has poked around in the |
Misc/NEWS.d/next/Library/2024-04-24-12-29-33.gh-issue-118221.2k_bac.rst
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@erlend-aasland Thanks 👍
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
Thanks for the review, Mariusz! I'll land this later this week, in case anyone else wants to take a look. |
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
That's good, thanks! |
Thanks for the review, Serhiy! |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
GH-118270 is a backport of this pull request to the 3.12 branch. |
…ump() (#118223) (#118270) sqlite3.iterdump() depends on the row factory returning resulting rows as tuples; it will fail with custom row factories like for example a dict factory. With this commit, we explicitly reset the row factory of the cursor used by iterdump(), so we always get predictable results. This does not affect the row factory of the parent connection. Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
The iterdump() implementation depends on the row factory returning
resulting rows as tuples; it will fail with custom row factories like
for example a dict factory.
Fixed by overriding the row factory of the cursor used by iterdump().
FTR, this does not affect the row factory of the parent connection.