FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-118928: Amend sqlite3 execute*() deprecation notes by erlend-aasland · Pull Request #135163 · python/cpython · GitHub

/ cpython Public
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .rst  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
22 changes: 11 additions & 11 deletions Doc/library/sqlite3.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -1482,7 +1482,9 @@ Cursor objects
:type parameters: :class:`dict` | :term:`sequence`

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

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

.. deprecated-removed:: 3.12 3.14
.. versionchanged:: 3.14

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

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

Expand All @@ -1519,8 +1519,10 @@ Cursor objects
:type parameters: :term:`iterable`

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

Example:

Expand All @@ -1544,14 +1546,12 @@ Cursor objects

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

.. deprecated-removed:: 3.12 3.14
.. versionchanged:: 3.14

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

.. method:: executescript(sql_script, /)

Expand Down

Back | FazBrowse Home | New Git URL