Géry <gery.o...@gmail.com> added the comment:

> If this ever gets implemented, "autocommit" would be a terrible name for it. 
> That word has a very specific meaning in SQLite, which is essentially the 
> same as "not in a transaction started with BEGIN ...".

Yes if you are talking about SQLite, the database ENGINE: the SQL statements 
inside BEGIN and COMMIT are said to be in manual commit mode, while SQL 
statements outside are said to be in autocommit mode. So the autocommit mode is 
the default mode for database ENGINES.

But here I am talking about SQLite3, the Python database DRIVER. You do not 
issue BEGIN statements with database DRIVERS, they are issued implicitly, so 
that the manual mode is the default mode for database DRIVERS.

Cf. this Stack Overflow answer for more details: 
https://stackoverflow.com/a/48391535/2326961

> At the moment, if you want to explicitly control when transactions start (a 
> good idea considering how confusing the current behaviour is)

No, you do not want that at the database DRIVER level. Because like Mike Bayer 
explained in issue #9924, this is not what other database DRIVERS do, and this 
is not PEP 249 compliant (Python Database API Specification v2.0), as its 
author Marc-André Lemburg explained (cf. 
https://mail.python.org/pipermail/db-sig/2010-September/005645.html):

> Randall Nortman wrote:
> # PEP 249 says that transactions end on commit() or rollback(), but it
> # doesn't explicitly state when transactions should begin, and there is
> # no begin() method. 
>
> Transactions start implicitly after you connect and after you call .commit() 
> or .rollback(). They are not started for each statement.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue39457>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to