[Python-checkins] gh-96810: Clarify for which statements sqlite3 implicitly opens transactions (GH-96832)

miss-islington webhook-mailer at python.org
Thu Sep 15 17:21:13 EDT 2022


https://github.com/python/cpython/commit/9ab9e82b86587b7c9366f6aca592c71c1ad02815
commit: 9ab9e82b86587b7c9366f6aca592c71c1ad02815
branch: 3.11
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2022-09-15T14:21:08-07:00
summary:

gh-96810: Clarify for which statements sqlite3 implicitly opens transactions (GH-96832)

(cherry picked from commit 16c33a9676e2f3ef330d09f2ab515c56636fa09f)

Co-authored-by: Erlend E. Aasland <erlend.aasland at protonmail.com>

files:
M Doc/library/sqlite3.rst

diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst
index 28f12040b63e..70cf43c2544e 100644
--- a/Doc/library/sqlite3.rst
+++ b/Doc/library/sqlite3.rst
@@ -2236,7 +2236,8 @@ If the connection attribute :attr:`~Connection.isolation_level`
 is not ``None``,
 new transactions are implicitly opened before
 :meth:`~Cursor.execute` and :meth:`~Cursor.executemany` executes
-``INSERT``, ``UPDATE``, ``DELETE``, or ``REPLACE`` statements.
+``INSERT``, ``UPDATE``, ``DELETE``, or ``REPLACE`` statements;
+for other statements, no implicit transaction handling is performed.
 Use the :meth:`~Connection.commit` and :meth:`~Connection.rollback` methods
 to respectively commit and roll back pending transactions.
 You can choose the underlying `SQLite transaction behaviour`_ —



More information about the Python-checkins mailing list