◐ Shell
clean mode source ↗

bpo-42213: Check connection in sqlite3.Connection.__enter__ by erlend-aasland · Pull Request #26512 · python/cpython

Skip to content

Navigation Menu

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Merged

vstinner

merged 2 commits into

Jun 3, 2021

Conversation

@erlend-aasland

  • add tests that exercise operations against a closed database
  • add utility wrapper for sqlite3_close_v2()
  • add connection sanity check on __enter__
  • simplify error handling; sqlite3_close_v2() always returns SQLITE_OK

https://bugs.python.org/issue42213

- add tests that exercise stuff against a closed database
- add wrapper for sqlite3_close_v2()
- check connection on __enter__
- explicitly free pending statements before close()
- sqlite3_close_v2() always returns SQLITE_OK

@erlend-aasland

@erlend-aasland erlend-aasland changed the title bpo-42213: Refactor sqlite3 connection close bpo-42213: Check connection in sqlite3.Connection.__enter__

Jun 3, 2021

vstinner

@vstinner

Merged, this change is atomic and remains useful, thanks!

@erlend-aasland

Thanks for reviewing, Victor!

Labels