Just to confirm, this is the usual meaning of Connection.autocommit (and a draft of what I’ll kick off the process with):
Attribute to query and set the autocommit mode of the connection.
Returns
Trueif the connection is operating in autocommit (non-transactional) mode. ReturnsFalseis the connection is operating in manual commit (transactional) mode.Setting the attribute to
TrueorFalseadjusts the connection’s mode accordingly.The details around changing the value are database dependent, e.g. changing from
TruetoFalsewill usually start a new transaction, while changing fromFalsetoTruewill usually cause the current transaction to be committed. However, it is also possible that a database raises an error in case there are pending changes to be committed. To prevent the latter case, it is best to explicitly commit or rollback the current transaction before switching on autocommit mode on the connection.
It may make sense to have the DB API modules enforce the behavior described as “usual” behavior.