summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorErlend E. Aasland <erlend@python.org>2023-08-29 20:02:12 (GMT)
committerGitHub <noreply@github.com>2023-08-29 20:02:12 (GMT)
commit0b0c1d046cac540deefc56ab3c38732bc76f6c56 (patch)
treece91d7e770e3b5f204f377a219fc63aa7f53ddac /Doc
parent77e8f233acd39420dc8921960715bf6b29587fee (diff)
downloadcpython-0b0c1d046cac540deefc56ab3c38732bc76f6c56.zip
cpython-0b0c1d046cac540deefc56ab3c38732bc76f6c56.tar.gz
cpython-0b0c1d046cac540deefc56ab3c38732bc76f6c56.tar.bz2
gh-108278: Deprecate passing the first param of sqlite3.Connection callback APIs by keyword (#108632)
Deprecate passing the callback callable by keyword for the following sqlite3.Connection APIs: - set_authorizer(authorizer_callback) - set_progress_handler(progress_handler, ...) - set_trace_callback(trace_callback) The affected parameters will become positional-only in Python 3.15.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/sqlite3.rst27
-rw-r--r--Doc/whatsnew/3.13.rst7
2 files changed, 28 insertions, 6 deletions
diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst
index 5137e17..0abdab5 100644
--- a/Doc/library/sqlite3.rst
+++ b/Doc/library/sqlite3.rst
@@ -763,10 +763,10 @@ Connection objects
... print(row)
('acbd18db4cc2f85cedef654fccc4a4d8',)
- .. versionchanged:: 3.13
+ .. versionchanged:: 3.13
- Passing *name*, *narg*, and *func* as keyword arguments is deprecated.
- These parameters will become positional-only in Python 3.15.
+ Passing *name*, *narg*, and *func* as keyword arguments is deprecated.
+ These parameters will become positional-only in Python 3.15.
.. method:: create_aggregate(name, n_arg, aggregate_class)
@@ -822,10 +822,10 @@ Connection objects
3
- .. versionchanged:: 3.13
+ .. versionchanged:: 3.13
- Passing *name*, *n_arg*, and *aggregate_class* as keyword arguments is deprecated.
- These parameters will become positional-only in Python 3.15.
+ Passing *name*, *n_arg*, and *aggregate_class* as keyword arguments is deprecated.
+ These parameters will become positional-only in Python 3.15.
.. method:: create_window_function(name, num_params, aggregate_class, /)
@@ -991,6 +991,11 @@ Connection objects
.. versionchanged:: 3.11
Added support for disabling the authorizer using ``None``.
+ .. versionchanged:: 3.13
+
+ Passing *authorizer_callback* as a keyword argument to is deprecated.
+ The parameter will become positional-only in Python 3.15.
+
.. method:: set_progress_handler(progress_handler, n)
@@ -1006,6 +1011,11 @@ Connection objects
currently executing query and cause it to raise a :exc:`DatabaseError`
exception.
+ .. versionchanged:: 3.13
+
+ Passing *progress_handler* as a keyword argument to is deprecated.
+ The parameter will become positional-only in Python 3.15.
+
.. method:: set_trace_callback(trace_callback)
@@ -1030,6 +1040,11 @@ Connection objects
.. versionadded:: 3.3
+ .. versionchanged:: 3.13
+
+ Passing *trace_callback* as a keyword argument to is deprecated.
+ The parameter will become positional-only in Python 3.15.
+
.. method:: enable_load_extension(enabled, /)
diff --git a/Doc/whatsnew/3.13.rst b/Doc/whatsnew/3.13.rst
index 1c94da2..be5bf9a 100644
--- a/Doc/whatsnew/3.13.rst
+++ b/Doc/whatsnew/3.13.rst
@@ -266,6 +266,13 @@ Deprecated
* :meth:`~sqlite3.Connection.create_function`
* :meth:`~sqlite3.Connection.create_aggregate`
+ Deprecate passing the callback callable by keyword for the following
+ :class:`sqlite3.Connection` APIs:
+
+ * :meth:`~sqlite3.Connection.set_authorizer`
+ * :meth:`~sqlite3.Connection.set_progress_handler`
+ * :meth:`~sqlite3.Connection.set_trace_callback`
+
The affected parameters will become positional-only in Python 3.15.
(Contributed by Erlend E. Aasland in :gh:`107948` and :gh:`108278`.)