Marc-Andre Lemburg added the comment: As general comment, I think you'd have to check which operation modes SQLite supports for the case of a transaction commit/rollback in the light of open cursors.
ODBC defines the following cases and each data source can specify a different behavior (https://msdn.microsoft.com/en-us/library/ms711769%28v=vs.85%29.aspx): * All cursors are closed, and access plans for prepared statements on that connection are deleted. * All cursors are closed, and access plans for prepared statements on that connection remain intact. * All cursors remain open, and access plans for prepared statements on that connection remain intact. The Python DB-API does not specify any particular behavior (since this depends on the database backend), so I guess pysqlite3 should implement whatever SQLite supports per default in such cases (or make this configurable). BTW: It is quite common for databases to support the second mode of operation: * All cursors are closed, and access plans for prepared statements on that connection remain intact. since this allows pooling cursors to cache often used access plans. ---------- nosy: +lemburg _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29006> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com