sqlite-utils/sqlite_utils
Simon Willison 6df6da1a8e Rename ensure_autocommit_off() to ensure_autocommit_on(), closes #705
The ensure_autocommit_off() context manager was misleadingly named: it
sets isolation_level = None on the underlying sqlite3 connection, which
puts the driver INTO autocommit mode (no implicit transactions) - the
opposite of what the name and docstring claimed.

The behavior was always correct for its call sites, which need
autocommit to run PRAGMA statements like journal_mode=wal. This renames
the method to ensure_autocommit_on() with an accurate docstring, updates
the three internal call sites, adds tests, and documents the rename in
the changelog and the 3.x to 4.0 upgrading guide. The old name is
removed outright since 4.0 permits breaking changes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-05 21:50:20 -07: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 Preserve duplicate column names in query results 2026-07-05 21:20:39 -07:00
db.py Rename ensure_autocommit_off() to ensure_autocommit_on(), closes #705 2026-07-05 21:50:20 -07:00
hookspecs.py More type annotations (#697) 2025-12-16 22:11:47 -08:00
migrations.py Polish: clearer errors, corrected docstrings, setuptools pin 2026-07-04 19:13:15 +00: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