From 8bc1fd8068e27b5644c49539dbc510389fab7f22 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 24 Nov 2025 08:40:02 +0000 Subject: [PATCH 1/2] Initial plan From 20fa91a0e2337695eff9bf3d4a391f5f31bd5117 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 24 Nov 2025 08:46:03 +0000 Subject: [PATCH 2/2] Remove Sentinel hacks for Click 8.3.1 Co-authored-by: simonw <9599+simonw@users.noreply.github.com> --- pyproject.toml | 2 +- sqlite_utils/cli.py | 15 --------------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index a46bfd02..333e77be 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,7 +22,7 @@ classifiers = [ ] dependencies = [ - "click", + "click>=8.3.1", "click-default-group>=1.2.3", "pluggy", "python-dateutil", diff --git a/sqlite_utils/cli.py b/sqlite_utils/cli.py index 94791211..a9244394 100644 --- a/sqlite_utils/cli.py +++ b/sqlite_utils/cli.py @@ -963,11 +963,6 @@ def insert_upsert_implementation( functions=None, strict=False, ): - convert = _value_or_none(convert) - delimiter = _value_or_none(delimiter) - quotechar = _value_or_none(quotechar) - encoding = _value_or_none(encoding) - bulk_sql = _value_or_none(bulk_sql) db = sqlite_utils.Database(path) _load_extensions(db, load_extension) _maybe_register_functions(db, functions) @@ -1943,9 +1938,6 @@ def memory( \b sqlite-utils memory animals.csv --schema """ - sql = _value_or_none(sql) - save = _value_or_none(save) - encoding = _value_or_none(encoding) db = sqlite_utils.Database(memory=True) # If --dump or --save or --analyze used but no paths detected, assume SQL query is a path: @@ -3328,16 +3320,9 @@ def _register_functions(db, functions): db.register_function(value, name=name) -def _value_or_none(value): - if getattr(value, "__class__", None).__name__ == "Sentinel": - return None - return value - - def _maybe_register_functions(db, functions_list): if not functions_list: return for functions in functions_list: - functions = _value_or_none(functions) if isinstance(functions, str) and functions.strip(): _register_functions(db, functions)