8000 [3.12] gh-108083: Don't ignore exceptions in sqlite3.Connection.__init__() and .close() (#108084) by erlend-aasland · Pull Request #108141 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

[3.12] gh-108083: Don't ignore exceptions in sqlite3.Connection.__init__() and .close() (#108084) #108141

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 1 commit into from
Aug 19, 2023

Conversation

erlend-aasland
Copy link
Contributor
@erlend-aasland erlend-aasland commented Aug 19, 2023
  • 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 vstinner@python.org
Co-authored-by: Serhiy Storchaka storchaka@gmail.com

….__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 <vstinner@python.org>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0