Skip to content

4.0rc1

Pre-release
Pre-release

Choose a tag to compare

@simonw simonw released this 21 Jun 23:30
  • New database migrations system, incorporating functionality that was previously provided by the separate sqlite-migrate plugin. Define migration sets using the new sqlite_utils.Migrationsclass and apply them using the sqlite-utils migrate command or the migrations Python API. (#752)
  • New db.atomic() context manager providing nested transaction support using SQLite transactions and savepoints. Internal multi-step operations such as table.transform() now use this mechanism to avoid unexpectedly committing an existing transaction. (#755)
  • Database objects can now be used as context managers, automatically closing the connection when the with block exits. The CLI also now closes database and file handles more reliably, resolving a number of ResourceWarning warnings. (#692)
  • The sqlite-utils convert command can now accept a direct callable reference such as r.parsedate or json.loads --import json as the conversion code, as an alternative to calling it explicitly with r.parsedate(value). (#686)
  • Fixed a bug where CSV or TSV files with only a header row could crash sqlite-utils insert and sqlite-utils memory when type detection was enabled. Thanks, Rami Abdelrazzaq. (#702, #707)
  • Fixed a bug where installed plugins could be loaded while running the test suite, despite the test-mode safeguard that disables plugin loading. Thanks, Rami Abdelrazzaq. (#713, #719)
  • table.detect_fts() now recognizes legacy FTS virtual tables that quote the content= table name using square brackets, allowing table.enable_fts(..., replace=True) to replace them correctly. (#694)
  • Now depends on Click 8.3.1 or later, removing compatibility workarounds for Click's Sentineldefault values. (#666)
  • Improved type annotations throughout the package, with ty now run in CI. (#697)
  • Development tooling now uses uv dependency groups, with separate dev and docs groups. (#691)
  • The test suite now runs against Python 3.15-dev. (#738)