Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
bpo-27334: roll back transaction if sqlite3 context manager fails to commit#26202
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
Uh oh!
There was an error while loading. Please reload this page.
Merged
Changes from all commits
Commits
Show all changes
26 commits Select commit Hold shift + click to select a range
a1361e6 bpo-27334: sqlite3 context manager now rolls back if commit fails
7111bba Add NEWS
0b63628 Add explanatory comments to test
fce98f1 PEP 8
3edde50 Prevent accidentally clearing the current exception
99c4157 ... and clean up
581bc44 Use test.support.SHORT_TIMEOUT to wait for sub-process
31f43fa Adjust comment
a66828b Make rollback thread friendly, and use _pysqlite_seterror to check th…
cdb0d50 Remove unused variable
e5fdaf7 Dedent test script using if 1 trick
f67591c Use test.support.TIMEOUT to adjust connection timeout
4e654d0 Address review: make news entry less low level-ish
98d3ada Chain exceptions if rollback also fails
195edbe Address review
da26486 Add managed connection helper
e5f9e16 Merge branch 'main' into sqlite-ctx-rollback
43ea594 Fix tests (cannot use managed_connect() bco. shared access
1d4bcf9 Revert "Fix tests (cannot use managed_connect() bco. shared access"
a4b388e Fix tests (cannot use managed_connect() bco. shared access
b03ee62 Merge branch 'main' into sqlite-ctx-rollback
b4c8d39 Merge branch 'main' into sqlite-ctx-rollback
da65db8 Merge branch 'main' into sqlite-ctx-rollback
1c93e9f Rewrite test
a32943c Restore comments
175d4a0 Merge branch 'main' into sqlite-ctx-rollback
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
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
2 changes: 2 additions & 0 deletions 2 Misc/NEWS.d/next/Library/2021-05-18-00-17-21.bpo-27334.32EJZi.rst
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| The :mod:`sqlite3` context manager now performs a rollback (thus releasing the | ||
| database lock) if commit failed. Patch by Luca Citi and Erlend E. Aasland. |
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.
Uh oh!
There was an error while loading. Please reload this page.