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
Next Next commit
Update docs
  • Loading branch information
erlend-aasland committed Feb 8, 2023
commit 483e4d6b26ee8e103f1d0fffb58bbd8cc1aafc60
8 changes: 7 additions & 1 deletion Doc/library/sqlite3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1950,7 +1950,7 @@ question marks (qmark style) or named placeholders (named style).
For the qmark style, *parameters* must be a
:term:`sequence` whose length must match the number of placeholders,
or a :exc:`ProgrammingError` is raised.
For the named style, *parameters* should be
For the named style, *parameters* must be
an instance of a :class:`dict` (or a subclass),
which must contain keys for all named parameters;
any extra items are ignored.
Expand Down Expand Up @@ -1980,6 +1980,12 @@ Here's an example of both styles:

[('C', 1972)]

.. deprecated-removed:: 3.12 3.14

If named placeholders are used and *parameters* is a sequence,
:exc:`DeprecationWarning` is raised.
Starting with Python 3.14, :exc:`ProgrammingError` will be raised.

.. note::

:pep:`249` numeric placeholders are *not* supported.
Expand Down
0