[Python-checkins] gh-96810: Clarify for which statements sqlite3 implicitly opens transactions (#96832)
erlend-aasland
webhook-mailer at python.org
Thu Sep 15 17:12:07 EDT 2022
https://github.com/python/cpython/commit/16c33a9676e2f3ef330d09f2ab515c56636fa09f
commit: 16c33a9676e2f3ef330d09f2ab515c56636fa09f
branch: main
author: Erlend E. Aasland <erlend.aasland at protonmail.com>
committer: erlend-aasland <erlend.aasland at protonmail.com>
date: 2022-09-15T23:11:52+02:00
summary:
gh-96810: Clarify for which statements sqlite3 implicitly opens transactions (#96832)
files:
M Doc/library/sqlite3.rst
diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst
index a99c0b9216b9..e2774a502403 100644
--- a/Doc/library/sqlite3.rst
+++ b/Doc/library/sqlite3.rst
@@ -2274,7 +2274,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