From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Thu, 15 Sep 2022 21:21:08 +0000 (-0700) Subject: gh-96810: Clarify for which statements sqlite3 implicitly opens transactions (GH... X-Git-Tag: v3.11.0~42 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=746dad4eaba4937b18c0c457abf8a9933c8e261d;p=thirdparty%2FPython%2Fcpython.git gh-96810: Clarify for which statements sqlite3 implicitly opens transactions (GH-96832) (cherry picked from commit 16c33a9676e2f3ef330d09f2ab515c56636fa09f) Co-authored-by: Erlend E. Aasland --- diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst index 110d262ee600..99a413fb13ae 100644 --- a/Doc/library/sqlite3.rst +++ b/Doc/library/sqlite3.rst @@ -2239,7 +2239,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`_ —