8000 gh-118928: Amend sqlite3 execute*() deprecation notes (#135163) · python/cpython@ee7345d · GitHub
[go: up one dir, main page]

Skip to content

Commit ee7345d

Browse files
gh-118928: Amend sqlite3 execute*() deprecation notes (#135163)
1 parent c23eec2 commit ee7345d

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
@@ -1482,7 +1482,9 @@ Cursor objects
14821482
:type parameters: :class:`dict` | :term:`sequence`
14831483

14841484
:raises ProgrammingError:
1485-
If *sql* contains more than one SQL statement.
1485+
When *sql* contains more than one SQL statement.
1486+
When :ref:`named placeholders <sqlite3-placeholders>` are used
1487+
and *parameters* is a sequence instead of a :class:`dict`.
14861488

14871489
If :attr:`~Connection.autocommit` is
14881490
:data:`LEGACY_TRANSACTION_CONTROL`,
@@ -1491,13 +1493,11 @@ Cursor objects
14911493
and there is no open transaction,
14921494
a transaction is implicitly opened before executing *sql*.
14931495

1494-
.. deprecated-removed:: 3.12 3.14
1496+
.. versionchanged:: 3.14
14951497

1496-
:exc:`DeprecationWarning` is emitted if
1498+
:exc:`ProgrammingError` is emitted if
14971499
:ref:`named placeholders <sqlite3-placeholders>` are used
14981500
and *parameters* is a sequence instead of a :class:`dict`.
1499-
Starting with Python 3.14, :exc:`ProgrammingError` will
1500-
be raised instead.
15011501

15021502
Use :meth:`executescript` to execute multiple SQL statements.
15031503

@@ -1519,8 +1519,10 @@ Cursor objects
15191519
:type parameters: :term:`iterable`
15201520

15211521
:raises ProgrammingError:
1522-
If *sql* contains more than one SQL statement,
1523-
or is not a DML statement.
1522+
When *sql* contains more than one SQL statement
1523+
or is not a DML statement,
1524+
When :ref:`named placeholders <sqlite3-placeholders>` are used
1525+
and the items in *parameters* are sequences instead of :class:`dict`\s.
15241526

15251527
Example:
15261528

@@ -1544,14 +1546,12 @@ Cursor objects
15441546

15451547
.. _RETURNING clauses: https://www.sqlite.org/lang_returning.html
15461548

1547-
.. deprecated-removed:: 3.12 3.14
1549+
.. versionchanged:: 3.14
15481550

1549-
:exc:`DeprecationWarning` is emitted if
1551+
:exc:`ProgrammingError` is emitted if
15501552
:ref:`named placeholders <sqlite3-placeholders>` are used
15511553
and the items in *parameters* are sequences
15521554
instead of :class:`dict`\s.
1553-
Starting with Python 3.14, :exc:`ProgrammingError` will
1554-
be raised instead.
15551555

15561556
.. method:: executescript(sql_script, /)
15571557

0 commit comments

Comments
 (0)
0