Skip to content

Commit 19c3880

Browse files
authored
gh-99824: Document that sqlite3.connect implicitly open a transaction if autocommit=False (#99825)
Authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
1 parent fe17d35 commit 19c3880

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Doc/library/sqlite3.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -2468,9 +2468,9 @@ which implies :pep:`249`-compliant transaction control.
24682468
This means:
24692469

24702470
* :mod:`!sqlite3` ensures that a transaction is always open,
2471-
so :meth:`Connection.commit` and :meth:`Connection.rollback`
2472-
will implicitly open a new transaction immediately after closing
2473-
the pending one.
2471+
so :func:`connect`, :meth:`Connection.commit`, and :meth:`Connection.rollback`
2472+
will implicitly open a new transaction
2473+
(immediately after closing the pending one, for the latter two).
24742474
:mod:`!sqlite3` uses ``BEGIN DEFERRED`` statements when opening transactions.
24752475
* Transactions should be committed explicitly using :meth:`!commit`.
24762476
* Transactions should be rolled back explicitly using :meth:`!rollback`.

0 commit comments

Comments
 (0)