Skip to content

Commit 081421a

Browse files
[3.14] gh-118928: Amend sqlite3 execute*() deprecation notes (GH-135163) (#135342)
(cherry picked from commit ee7345d) Co-authored-by: Erlend E. Aasland <erlend@python.org>
1 parent 88d8a2e commit 081421a

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

Doc/library/sqlite3.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1492,7 +1492,9 @@ Cursor objects
14921492
:type parameters: :class:`dict` | :term:`sequence`
14931493

14941494
:raises ProgrammingError:
1495-
If *sql* contains more than one SQL statement.
1495+
When *sql* contains more than one SQL statement.
1496+
When :ref:`named placeholders <sqlite3-placeholders>` are used
1497+
and *parameters* is a sequence instead of a :class:`dict`.
14961498

14971499
If :attr:`~Connection.autocommit` is
14981500
:data:`LEGACY_TRANSACTION_CONTROL`,
@@ -1501,13 +1503,11 @@ Cursor objects
15011503
and there is no open transaction,
15021504
a transaction is implicitly opened before executing *sql*.
15031505

1504-
.. deprecated-removed:: 3.12 3.14
1506+
.. versionchanged:: 3.14
15051507

1506-
:exc:`DeprecationWarning` is emitted if
1508+
:exc:`ProgrammingError` is emitted if
15071509
:ref:`named placeholders <sqlite3-placeholders>` are used
15081510
and *parameters* is a sequence instead of a :class:`dict`.
1509-
Starting with Python 3.14, :exc:`ProgrammingError` will
1510-
be raised instead.
15111511

15121512
Use :meth:`executescript` to execute multiple SQL statements.
15131513

@@ -1529,8 +1529,10 @@ Cursor objects
15291529
:type parameters: :term:`iterable`
15301530

15311531
:raises ProgrammingError:
1532-
If *sql* contains more than one SQL statement,
1533-
or is not a DML statement.
1532+
When *sql* contains more than one SQL statement
1533+
or is not a DML statement,
1534+
When :ref:`named placeholders <sqlite3-placeholders>` are used
1535+
and the items in *parameters* are sequences instead of :class:`dict`\s.
15341536

15351537
Example:
15361538

@@ -1554,14 +1556,12 @@ Cursor objects
15541556

15551557
.. _RETURNING clauses: https://www.sqlite.org/lang_returning.html
15561558

1557-
.. deprecated-removed:: 3.12 3.14
1559+
.. versionchanged:: 3.14
15581560

1559-
:exc:`DeprecationWarning` is emitted if
1561+
:exc:`ProgrammingError` is emitted if
15601562
:ref:`named placeholders <sqlite3-placeholders>` are used
15611563
and the items in *parameters* are sequences
15621564
instead of :class:`dict`\s.
1563-
Starting with Python 3.14, :exc:`ProgrammingError` will
1564-
be raised instead.
15651565

15661566
.. method:: executescript(sql_script, /)
15671567

0 commit comments

Comments
 (0)