sqlite-utils/sqlite_utils
Claude 887c6543ee
Support sqlite3.connect(autocommit=True) connections
Database() now accepts connections created with the Python 3.12+
autocommit=True option. The library manages transactions itself using
explicit BEGIN/COMMIT/ROLLBACK and savepoint statements, all guarded by
conn.in_transaction, so it behaves identically in driver-level
autocommit mode - the entire test suite passes under
pytest --sqlite-autocommit with no further changes.

autocommit=False connections are still rejected with TransactionError:
in that mode the driver holds an implicit transaction open at all
times, so explicit BEGIN fails and PRAGMA journal_mode cannot run.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PFkrS2nuP8mo1jmT594VCd
2026-07-09 05:19:01 +00:00
..
__init__.py New migrations system, ported from sqlite-migrate (#754) 2026-06-21 09:40:21 -07:00
__main__.py Support 'python -m sqlite_utils', closes #368 2022-01-08 18:33:22 -08:00
cli.py drop-index command and table.drop_index(index_name) 2026-07-07 21:00:43 -07:00
db.py Support sqlite3.connect(autocommit=True) connections 2026-07-09 05:19:01 +00:00
hookspecs.py More type annotations (#697) 2025-12-16 22:11:47 -08:00
migrations.py migrate --stop-before an already-applied migration is now an error 2026-07-06 21:50:05 -07:00
plugins.py fix: Plugins are still loaded when running tests (#719) 2026-06-21 16:14:45 -07:00
py.typed py.typed file so mypy picks up the types, closes #331 2021-11-14 15:21:04 -08:00
recipes.py More type annotations (#697) 2025-12-16 22:11:47 -08:00
utils.py Preserve duplicate column names in query results 2026-07-05 21:20:39 -07:00