Skip to content
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 ourterms of serviceand privacy statement.We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
Merged
Prev Previous commit
Next Next commit
Update docs
  • Loading branch information
erlend-aasland committed Feb 8, 2023
commit483e4d6b26ee8e103f1d0fffb58bbd8cc1aafc60
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*shouldbe
For the named style, *parameters*mustbe
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.

erlend-aaslandmarked this conversation as resolved.
Show resolved Hide resolved
.. note::

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