Feature
RustPython exposes the three Connection.autocommit modes, but autocommit=False does not follow CPython's transaction lifecycle. A connection does not enter a transaction immediately, and commit() and rollback() do not open a new transaction afterward. Closing a connection and running executescript() also do not consistently preserve the selected mode.
CPython keeps a transaction open for autocommit=False, reopens one after commit() or rollback(), rolls back a pending transaction on close, and preserves the behavior of the True, False, and legacy modes in context managers, DML execution, and executescript().
This leaves six tests in Lib/test/test_sqlite3/test_transactions.py marked as expected failures. Invalid autocommit value validation is outside this scope.
Python Documentation or reference to CPython source code
Feature
RustPython exposes the three
Connection.autocommitmodes, butautocommit=Falsedoes not follow CPython's transaction lifecycle. A connection does not enter a transaction immediately, andcommit()androllback()do not open a new transaction afterward. Closing a connection and runningexecutescript()also do not consistently preserve the selected mode.CPython keeps a transaction open for
autocommit=False, reopens one aftercommit()orrollback(), rolls back a pending transaction on close, and preserves the behavior of theTrue,False, and legacy modes in context managers, DML execution, andexecutescript().This leaves six tests in
Lib/test/test_sqlite3/test_transactions.pymarked as expected failures. Invalid autocommit value validation is outside this scope.Python Documentation or reference to CPython source code