sqlite3: validate narg before creating functions/aggregates (#8532) · RustPython/RustPython@36a59f5 · GitHub
Skip to content

Commit 36a59f5

Browse files
authored
sqlite3: validate narg before creating functions/aggregates (#8532)
CPython 3.14 added check_num_params() which raises ProgrammingError when narg/n_arg/num_params is out of range (-1..=SQLITE_LIMIT_FUNCTION_ARG). RustPython passed invalid values directly to SQLite, resulting in an OperationalError instead. Add check_num_params() helper and call it in create_function(), create_aggregate(), and create_window_function(). Assisted-by: GitHub Copilot:claude-sonnet-4-6
1 parent 833a2ba commit 36a59f5

2 files changed

Lines changed: 19 additions & 3 deletions

File tree

Lib/test/test_sqlite3/test_userfunctions.py

Lines changed: 0 additions & 3 deletions

crates/stdlib/src/_sqlite3.rs

Lines changed: 19 additions & 0 deletions

0 commit comments

Comments
 (0)