Skip to content

Commit 86b8244

Browse files
committed
Document sqlite3.connect() as implicitly opening transactions in the new PEP-249 manual commit mode
1 parent dfc2732 commit 86b8244

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Doc/library/sqlite3.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2467,10 +2467,9 @@ It is suggested to set *autocommit* to ``False``,
24672467
which implies :pep:`249`-compliant transaction control.
24682468
This means:
24692469

2470-
* :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.
2470+
* :func:`connect`, :meth:`Connection.commit`, and :meth:`Connection.rollback`
2471+
implicitly open a new transaction to ensure that a transaction is always
2472+
open.
24742473
:mod:`!sqlite3` uses ``BEGIN DEFERRED`` statements when opening transactions.
24752474
* Transactions should be committed explicitly using :meth:`!commit`.
24762475
* Transactions should be rolled back explicitly using :meth:`!rollback`.

0 commit comments

Comments
 (0)