aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Modules/_sqlite/module.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_sqlite/module.c')
-rw-r--r--Modules/_sqlite/module.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/Modules/_sqlite/module.c b/Modules/_sqlite/module.c
index 0c503dfbebb..dd45ffc1988 100644
--- a/Modules/_sqlite/module.c
+++ b/Modules/_sqlite/module.c
@@ -64,6 +64,17 @@ pysqlite_connect(PyObject *module, PyObject *const *args, Py_ssize_t nargsf,
static const int FACTORY_POS = 5;
Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
+ if (nargs > 1 && nargs <= 8) {
+ if (PyErr_WarnEx(PyExc_DeprecationWarning,
+ "Passing more than 1 positional argument to sqlite3.connect()"
+ " is deprecated. Parameters 'timeout', 'detect_types', "
+ "'isolation_level', 'check_same_thread', 'factory', "
+ "'cached_statements' and 'uri' will become keyword-only "
+ "parameters in Python 3.15.", 1))
+ {
+ return NULL;
+ }
+ }
if (nargs > FACTORY_POS) {
factory = args[FACTORY_POS];
}