Drop support for Python 3.7, refs #616

This commit is contained in:
Simon Willison 2024-01-30 18:25:01 -08:00
commit c304fc3891
6 changed files with 25 additions and 30 deletions

View file

@ -457,8 +457,7 @@ class Database:
fn_name, arity, fn, **dict(kwargs, deterministic=True)
)
registered = True
except (sqlite3.NotSupportedError, TypeError):
# TypeError is Python 3.7 "function takes at most 3 arguments"
except sqlite3.NotSupportedError:
pass
if not registered:
self.conn.create_function(fn_name, arity, fn, **kwargs)