]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-30593: Doc'ed that executescript() disregards isolation level (GH-26220)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 19 May 2021 07:32:45 +0000 (00:32 -0700)
committerGitHub <noreply@github.com>
Wed, 19 May 2021 07:32:45 +0000 (10:32 +0300)
(cherry picked from commit 901443757333a66ff2b5c85eba30dc1c48eac321)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
Doc/library/sqlite3.rst

index a82ba3a55248aba467e40cc345caab4e71b6ac01..4ae4b4dcff6767be80d0a037a7cd0fc11612eb08 100644 (file)
@@ -635,7 +635,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`.
 
@@ -1038,6 +1039,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.