]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-108083: Don't ignore exceptions in sqlite3.Connection.__init__() and .close()... 104245/head
authorErlend E. Aasland <erlend@python.org>
Fri, 18 Aug 2023 11:39:12 +0000 (13:39 +0200)
committerGitHub <noreply@github.com>
Fri, 18 Aug 2023 11:39:12 +0000 (11:39 +0000)
commitfd195092204aa7fc9f13c5c6d423bc723d0b3520
treeec996413c703f184f1caa36a906015453684eaad
parent3ff5ef2ad3d89c3ccf4e07ac8fdd798267ae6c61
gh-108083: Don't ignore exceptions in sqlite3.Connection.__init__() and .close() (#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

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Misc/NEWS.d/next/Library/2023-08-17-12-59-35.gh-issue-108083.9J7UcT.rst [new file with mode: 0644]
Modules/_sqlite/connection.c