-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
gh-79009: sqlite3.iterdump now correctly handles tables with autoincrement #9621
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
Conversation
…ement The iterdump command in Lib/sqlite3/dump.py assumed that the table "sqlite_sequence" already exists. When this was not the case and exception was thrown.
|
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA). Unfortunately our records indicate you have not signed the CLA. For legal reasons we need you to sign this before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. You can check yourself to see if the CLA has been received. Thanks again for your contribution, we look forward to reviewing it! |
|
Hello, it seems that I stumbled upon this bug today with Python 3.6.13. Are there any news as to a fix? |
|
I saw that recently the unit tests of sqlite3 |
Thanks! |
# Conflicts: # Lib/sqlite3/test/dump.py
…es according to PEP 8
Misc/NEWS.d/next/Library/2018-09-28-22-18-03.bpo-34828.5Zyi_S.rst
Outdated
Show resolved
Hide resolved
|
I will make the requested changes as soon as I am home from my holidays 👍. Right now the internet is so slow, I cannot clone the project |
# Conflicts: # Lib/sqlite3/test/test_dump.py
…qlite3 dump tests
erlend-aasland
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.
Thanks for updating your PR :) I've left some comments.
|
@itssme, do you plan to follow up this PR? |
|
Thanks for the reminder, yes I will update it this weekend 👍 |
…l as small formatting changes in sqlite3/dump.py
|
@itssme, I won't have time to look at this for a week or two, but it is on my list :) |
erlend-aasland
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.
Thanks for doing this!
I think the tests can be simplified; the posts table is not really needed to test this functionality, so I suggest to drop it, in order to narrow down the tests.
In test_dump_autoincrement_create_new_db, one test table should be sufficient, right?
I also got some style nits; do you mind if I just apply them before merge?
…xed wrong use of double quotes and single quotes in sqlite3 statements
|
I removed the |
Yes please, feel free to make any changes 👍 |
|
Thanks! I'll review the changes this coming week. |
- consolidate construction of sqlite_sequence - use existing quoting style
- reduce number of escape chars in string literals - normalise variable names - in test_dump_autoincrement_create_new_db, simplify setup - use subTest in order to make it easier to assert more thoroughly
|
Thanks @itssme for the PR, and @erlend-aasland for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11. |
|
GH-94014 is a backport of this pull request to the 3.11 branch. |
|
GH-94015 is a backport of this pull request to the 3.10 branch. |
|
Thank you so much for the report, the fix, and your patience, @itssme! Unfortunately this took way too long to land, but at last the fix is on its way to the upcoming Python 3.12, 3.11, and 3.10 releases. Thanks again! |
The iterdump command in Lib/sqlite3/dump.py assumed that the table "sqlite_sequence" already exists. When this was not the case and exception was thrown.
Changes:
Resolves gh-79009