Repository navigation
bpo-27645: Supporting native backup facility of SQLite #4238
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
52 commits
Select commit
Hold shift + click to select a range
0c9a4e5
Expose the SQLite Online Backup API as Connection.backup()
lelit 624849a
Preliminary documentation for sqlite3.Connection.backup()
lelit b17e572
Reduce code nesting depth by using a finally label, as other function…
lelit 3a64654
Wrap SQLite calls between BEGIN_ALLOW_THREADS and END_ALLOW_THREADS
lelit 8220ed6
Make pages and progress keyword-only args in sqlite3.Connection.backup()
lelit f7c6fc5
Remove reference to SQLite docs in Connection.backup() documentation
lelit df607df
Use f-string in the sqlite3.Connection.backup() example
lelit 169369b
Explicitly mark sqlite3.Connection.backup() as added in v3.7
lelit 7ee5341
Reduce chances of cluttering future “git blame”
lelit f88cd12
Parametrize the name of the database involved in the backup
lelit 7ee018c
Test propagation of exception raised in backup's progress callback
lelit 21bfc82
Use a better name for variable
lelit 9574b91
Do not delay next iteration if the result was OK
lelit 09407c8
Omit the backup method when underlying SQLite library is older than 3…
lelit f99e65e
Assert that the non-mandatory arguments are keyword-only
lelit aaa1508
Pass also the current status of the ongoing backup to the progress ca…
lelit 13de3a1
Slightly different way handling backup step's error state
lelit 9b2f47a
When an error occurs while the backup is going on, remove the target …
lelit ce55873
Add NEWS entry for issue 27645
lelit 5a08168
New argument "sleep" to specify a different number of milliseconds
lelit 960303f
Allow to copy the database to either an external file or to another C…
lelit 4bd0b3e
Check that target backup DB is not in transaction
lelit 7dc53f0
Use DeleteFileW() under MS Windows to delete incomplete backup
lelit a333639
Second attempt at properly calling DeleteFileW()
lelit 4ea5ca4
Setup exception from sqlite error condition
lelit 48fd04b
Close the backup connection in case of error
lelit 3256d52
Attempt to chain the exception raised by incomplete backup deletion
lelit a04a86e
Fix double call to PyMem_Free()
lelit a4334a6
Remove leftover comment
lelit 69d8996
Drop const qualifier to avoid compiler warning
lelit ac5c64b
Avoid using NamedTemporaryFile in test cases
lelit 09671e4
Make the sleep parameter a double, accepting a value in seconds
lelit b5260e0
Replace gotos with explicit return, given that no cleanup is needed
lelit 37f316f
Rename test methods using snake_style instead of CamelCase
lelit b7fcf9e
Use one single pointers declaration style in the new function
lelit 6566166
Fix glitch in example code
lelit e6f8950
Rectify explanation of the pages parameter
lelit 5b06a74
Add missing ending dot
lelit 5c20723
Simplify code
lelit 2155feb
Add missing const qualifier
lelit d21c9cb
Fix leak by DECREFing the result of progress callback call
lelit 8e096c2
Restore the suite() function, used by outer Lib/test/test_sqlite.py
lelit a2f15bc
Simplify backup() implementation
lelit 66df8b3
Remove now useless includes
lelit 814ef4e
Recognize common error codes for old SQLite3 missing sqlite3_errstr()
lelit 8fe5c30
Move argument type check to PyArg_ParseTupleAndKeywords()
lelit acc2f37
Use better names for local variables
lelit 32285b1
Merge remote-tracking branch 'upstream/master' into pr/4238
berkerpeksag 7943561
Cosmetic fixes
berkerpeksag 824d5f8
Fix segfault in test_bad_target_closed_connection
berkerpeksag 6fd854a
Relax an assert
berkerpeksag 57f49c6
This will be included in 3.7
berkerpeksag File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Check that target backup DB is not in transaction
This is needed for SQLite < 3.8.7.
- Loading branch information
commit 4bd0b3e074d9230d34fee1ba5b6a4dfbcd82a374
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
3.8.7 was released in 2014, https://www.sqlite.org/releaselog/3_8_7.html
Do we need to support older versions? How about requiring a minimum version of 3.8.7 or even newer to compile CPython?
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.
I'm definitely in favor of not supporting old versions of dependencies if it lets us avoid lots of compatibility code.
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.
According to distrowatch, Debian Jessie has 3.8.7.1 but CentOS 7-1708 only 3.7.17. Guess we need to support < 3.8 for a while.