GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||
GeezerVison is showing github.com — gh-108083: Don't ignore exceptions in sqlite3.Connection.__init__() and .close() by erlend-aasland · Pull Request #108084 · python/cpython Conversation
|
|
Maybe only change close once you converted sqlite connection to finalizer API. Maybe start with a first PR to convert dealloc to finalizer API? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Yeah, I think I want to land #108015 first. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Actually, I'll land this first; I want to wait for some external opinions before continuing with the finalizer PR :) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@vstinner, I added the finalizer code from #108015 here. I thought it made for a cleaner shutdown operation. I also made sure we close the database before we free the callback contexts. There's a few things I'd like to do post this PR, and that is to properly handle |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM, nice fix.
I just left a minor coding style remark, feel free to ignore it.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Thanks for the reviews, Serhiy and Victor; it helps to have more eyes, especially for scenarios like this. It is easy to misstep. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Co-authored-by: Serhiy Storchaka <[email protected]>
|
Thanks @erlend-aasland for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Sorry, @erlend-aasland, I could not cleanly backport this to |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Sorry, @erlend-aasland, I could not cleanly backport this to |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
….__init__() and .close() (python#108084) - Add explanatory comments - Add return value to connection_close() for propagating errors - Always check the return value of connection_exec_stmt() - Assert pre/post state in remove_callbacks() - Don't log unraisable exceptions in case of interpreter shutdown - Make sure we're not initialized if reinit fails - Try to close the database even if ROLLBACK fails (cherry picked from commit fd19509) Co-authored-by: Victor Stinner <[email protected]> Co-authored-by: Serhiy Storchaka <[email protected]>
|
GH-108141 is a backport of this pull request to the 3.12 branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
FYI: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…t__() and .close() (#108084) (#108141) - Add explanatory comments - Add return value to connection_close() for propagating errors - Always check the return value of connection_exec_stmt() - Assert pre/post state in remove_callbacks() - Don't log unraisable exceptions in case of interpreter shutdown - Make sure we're not initialized if reinit fails - Try to close the database even if ROLLBACK fails (cherry picked from commit fd19509) Co-authored-by: Victor Stinner <[email protected]> Co-authored-by: Serhiy Storchaka <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.