[issue39457] Add an autocommit property to sqlite3.Connection with a PEP 249 compliant manual commit mode and migrate

mike bayer report at bugs.python.org
Wed Jan 6 08:21:56 EST 2021


mike bayer <mike_mp at zzzcomputing.com> added the comment:

I think this issue just discusses the naming of an attribute called ".autocommit".  for the discussion for SQLite's unusual starting of transactions, that's all in two other issues:

https://bugs.python.org/issue9924 

https://bugs.python.org/issue10740

so I would encourage folks to read those discussions.  at issue is the limitation of SQLite that it locks the whole file for transactions, which is the main rationale for why SQLite is hesitant to begin a transaction.  however, without configurability, this means it's not compatible with SAVEPOINT or serializable isolation levels.   when users want to use those two features we have them set isolation_level=None and emit "BEGIN" on the connection directly.    the connection.commit() and connection.rollback() methods continue to be functional

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39457>
_______________________________________


More information about the Python-bugs-list mailing list