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

This commit is contained in:
Erlend Egeberg Aasland 2021-05-19 09:05:48 +02:00 committed by GitHub
parent 4fdcc39f71
commit 9014437573
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -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.