[Python-checkins] gh-99824: Document that sqlite3.connect implicitly open a transaction if autocommit=False (#99825)

erlend-aasland webhook-mailer at python.org
Wed Nov 30 06:34:00 EST 2022


https://github.com/python/cpython/commit/19c38801ba2f42a220adece5d5f12e833b41822a
commit: 19c38801ba2f42a220adece5d5f12e833b41822a
branch: main
author: Géry Ogam <gery.ogam at gmail.com>
committer: erlend-aasland <erlend.aasland at protonmail.com>
date: 2022-11-30T12:33:50+01:00
summary:

gh-99824: Document that sqlite3.connect implicitly open a transaction if autocommit=False (#99825)

Authored-by: C.A.M. Gerlach <CAM.Gerlach at Gerlach.CAM>

files:
M Doc/library/sqlite3.rst

diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst
index 7e2235b285b8..a9ee1e207d0c 100644
--- a/Doc/library/sqlite3.rst
+++ b/Doc/library/sqlite3.rst
@@ -2468,9 +2468,9 @@ which implies :pep:`249`-compliant transaction control.
 This means:
 
 * :mod:`!sqlite3` ensures that a transaction is always open,
-  so :meth:`Connection.commit` and :meth:`Connection.rollback`
-  will implicitly open a new transaction immediately after closing
-  the pending one.
+  so :func:`connect`, :meth:`Connection.commit`, and :meth:`Connection.rollback`
+  will implicitly open a new transaction
+  (immediately after closing the pending one, for the latter two).
   :mod:`!sqlite3` uses ``BEGIN DEFERRED`` statements when opening transactions.
 * Transactions should be committed explicitly using :meth:`!commit`.
 * Transactions should be rolled back explicitly using :meth:`!rollback`.



More information about the Python-checkins mailing list