8000 gh-101693: In sqlite3, deprecate using named placeholders with parameters supplied as a sequence by erlend-aasland · Pull Request #101698 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-101693: In sqlite3, deprecate using named placeholders with parameters supplied as a sequence #101698

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Use deprecated-removed
  • Loading branch information
erlend-aasland committed Feb 14, 2023
commit 1687b65fe6cf0c4bdfc7d16cd1efd859937427e5
8 changes: 6 additions & 2 deletions Doc/library/sqlite3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1442,11 +1442,13 @@ Cursor objects
and there is no open transaction,
a transaction is implicitly opened before executing *sql*.

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

:exc:`DeprecationWarning` 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 Down Expand Up @@ -1482,12 +1484,14 @@ Cursor objects
# cur is an sqlite3.Cursor object
cur.executemany("INSERT INTO data VALUES(?)", rows)

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

:exc:`DeprecationWarning` 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
0