[Python-checkins] bpo-30593: Doc'ed that executescript() disregards isolation level (GH-26220)

berkerpeksag webhook-mailer at python.org
Wed May 19 03:37:40 EDT 2021


https://github.com/python/cpython/commit/1f483c0c1b5a9fd1062bacc2aeba6bb0e00009b7
commit: 1f483c0c1b5a9fd1062bacc2aeba6bb0e00009b7
branch: 3.10
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: berkerpeksag <berker.peksag at gmail.com>
date: 2021-05-19T10:37:33+03:00
summary:

bpo-30593: Doc'ed that executescript() disregards isolation level (GH-26220)

(cherry picked from commit 901443757333a66ff2b5c85eba30dc1c48eac321)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland at innova.no>

files:
M Doc/library/sqlite3.rst

diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst
index d0f28db12fda1..f9e4c8a269027 100644
--- a/Doc/library/sqlite3.rst
+++ b/Doc/library/sqlite3.rst
@@ -648,7 +648,8 @@ Cursor Objects
 
       This is a nonstandard convenience method for executing multiple SQL statements
       at once. It issues a ``COMMIT`` statement first, then executes the SQL script it
-      gets as a parameter.
+      gets as a parameter.  This method disregards :attr:`isolation_level`; any
+      transation control must be added to *sql_script*.
 
       *sql_script* can be an instance of :class:`str`.
 
@@ -1048,6 +1049,9 @@ setting :attr:`isolation_level` to ``None``.  This will leave the underlying
 control the transaction state by explicitly issuing ``BEGIN``, ``ROLLBACK``,
 ``SAVEPOINT``, and ``RELEASE`` statements in your code.
 
+Note that :meth:`~Cursor.executescript` disregards
+:attr:`isolation_level`; any transaction control must be added explicitly.
+
 .. versionchanged:: 3.6
    :mod:`sqlite3` used to implicitly commit an open transaction before DDL
    statements.  This is no longer the case.



More information about the Python-checkins mailing list