Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
gh-118221: Always use the default row factory in sqlite3.iterdump()#118223
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 ourterms of service andprivacy 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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
…mp()The iterdump() implementation depends on the row factory returningresulting rows as tuples; it will fail with custom row factories likefor 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.
erlend-aasland commentedApr 24, 2024
@kesry, can you see if this patch works for you? |
erlend-aasland commentedApr 24, 2024
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 OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
felixxm left a comment
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 👍
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
erlend-aasland commentedApr 24, 2024
Thanks for the review, Mariusz! I'll land this later this week, in case anyone else wants to take a look. |
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
kesry commentedApr 25, 2024
That's good, thanks! |
erlend-aasland commentedApr 25, 2024
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 the3.12 branch. |
…ump() (#118223) (#118270)sqlite3.iterdump() depends on the row factory returning resulting rowsas tuples; it will fail with custom row factories like for example adict factory.With this commit, we explicitly reset the row factory of the cursor usedby iterdump(), so we always get predictable results. This does notaffect the row factory of the parent connection.Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Uh oh!
There was an error while loading.Please reload this page.
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.