@@ -259,10 +259,10 @@ Reference
259
259
Module functions
260
260
^^^^^^^^^^^^^^^^
261
261
262
- .. function :: connect(database, timeout=5.0, detect_types=0, \
262
+ .. function :: connect(database, *, timeout=5.0, detect_types=0, \
263
263
isolation_level="DEFERRED", check_same_thread=True, \
264
264
factory=sqlite3.Connection, cached_statements=128, \
265
- uri=False, * , \
265
+ uri=False, \
266
266
autocommit=sqlite3.LEGACY_TRANSACTION_CONTROL)
267
267
268
268
Open a connection to an SQLite database.
@@ -355,11 +355,8 @@ Module functions
355
355
.. versionchanged :: 3.12
356
356
Added the *autocommit * parameter.
357
357
358
- .. versionchanged :: 3.13
359
- Positional use of the parameters *timeout *, *detect_types *,
360
- *isolation_level *, *check_same_thread *, *factory *, *cached_statements *,
361
- and *uri * is deprecated.
362
- They will become keyword-only parameters in Python 3.15.
358
+ .. versionchanged :: 3.15
359
+ All parameters except *database * are now keyword-only.
363
360
364
361
.. function :: complete_statement(statement)
365
362
@@ -693,7 +690,7 @@ Connection objects
693
690
:meth: `~Cursor.executescript ` on it with the given *sql_script *.
694
691
Return the new cursor object.
695
692
696
- .. method :: create_function(name, narg, func, *, deterministic=False)
693
+ .. method :: create_function(name, narg, func, /, *, deterministic=False)
697
694
698
695
Create or remove a user-defined SQL function.
699
696
@@ -719,6 +716,9 @@ Connection objects
719
716
.. versionchanged :: 3.8
720
717
Added the *deterministic * parameter.
721
718
719
+ .. versionchanged :: 3.15
720
+ The first three parameters are now positional-only.
721
+
722
722
Example:
723
723
724
724
.. doctest ::
@@ -733,13 +733,8 @@ Connection objects
733
733
('acbd18db4cc2f85cedef654fccc4a4d8',)
734
734
>>> con.close()
735
735
736
- .. versionchanged :: 3.13
737
-
738
- Passing *name *, *narg *, and *func * as keyword arguments is deprecated.
739
- These parameters will become positional-only in Python 3.15.
740
-
741
736
742
- .. method :: create_aggregate(name, n_arg, aggregate_class)
737
+ .. method :: create_aggregate(name, n_arg, aggregate_class, / )
743
738
744
739
Create or remove a user-defined SQL aggregate function.
745
740
@@ -763,6 +758,9 @@ Connection objects
763
758
Set to ``None `` to remove an existing SQL aggregate function.
764
759
:type aggregate_class: :term: `class ` | None
765
760
761
+ .. versionchanged :: 3.15
762
+ All three parameters are now positional-only.
763
+
766
764
Example:
767
765
768
766
.. testcode ::
@@ -792,11 +790,6 @@ Connection objects
792
790
793
791
3
794
792
795
- .. versionchanged :: 3.13
796
-
797
- Passing *name *, *n_arg *, and *aggregate_class * as keyword arguments is deprecated.
798
- These parameters will become positional-only in Python 3.15.
799
-
800
793
801
794
.. method :: create_window_function(name, num_params, aggregate_class, /)
802
795
@@ -937,7 +930,7 @@ Connection objects
937
930
Aborted queries will raise an :exc: `OperationalError `.
938
931
939
932
940
- .. method :: set_authorizer(authorizer_callback)
933
+ .. method :: set_authorizer(authorizer_callback, / )
941
934
942
935
Register :term: `callable ` *authorizer_callback * to be invoked
943
936
for each attempt to access a column of a table in the database.
@@ -962,12 +955,11 @@ Connection objects
962
955
.. versionchanged :: 3.11
963
956
Added support for disabling the authorizer using ``None ``.
964
957
965
- .. versionchanged :: 3.13
966
- Passing *authorizer_callback * as a keyword argument is deprecated.
967
- The parameter will become positional-only in Python 3.15.
958
+ .. versionchanged :: 3.15
959
+ The only parameter is now positional-only.
968
960
969
961
970
- .. method :: set_progress_handler(progress_handler, n)
962
+ .. method :: set_progress_handler(progress_handler, /, n)
971
963
972
964
Register :term: `callable ` *progress_handler * to be invoked for every *n *
973
965
instructions of the SQLite virtual machine. This is useful if you want to
@@ -981,12 +973,11 @@ Connection objects
981
973
currently executing query and cause it to raise a :exc: `DatabaseError `
982
974
exception.
983
975
984
- .. versionchanged :: 3.13
985
- Passing *progress_handler * as a keyword argument is deprecated.
986
- The parameter will become positional-only in Python 3.15.
976
+ .. versionchanged :: 3.15
977
+ The first parameter is now positional-only.
987
978
988
979
989
- .. method :: set_trace_callback(trace_callback)
980
+ .. method :: set_trace_callback(trace_callback, / )
990
981
991
982
Register :term: `callable ` *trace_callback * to be invoked
992
983
for each SQL statement that is actually executed by the SQLite backend.
@@ -1009,9 +1000,8 @@ Connection objects
1009
1000
1010
1001
.. versionadded :: 3.3
1011
1002
1012
- .. versionchanged :: 3.13
1013
- Passing *trace_callback * as a keyword argument is deprecated.
1014
- The parameter will become positional-only in Python 3.15.
1003
+ .. versionchanged :: 3.15
1004
+ The first parameter is now positional-only.
1015
1005
1016
1006
1017
1007
.. method :: enable_load_extension(enabled, /)
0 commit comments