From 9d38925cdecce7f18e1fd3791821176154dc5f3c Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Sun, 25 Jun 2023 18:31:22 -0700 Subject: [PATCH] Release 3.33 Refs #235, #559, #560 Refs https://github.com/simonw/llm/issues/60 Refs https://github.com/nalgeon/sqlean.py/issues/1 --- docs/changelog.rst | 9 +++++++++ setup.py | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index 65d4a0a..862a2f3 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -4,6 +4,15 @@ Changelog =========== +.. _v3_33: + +3.33 (2023-06-25) +----------------- + +- ``sqlite-utils`` will now use `sqlean.py `__ in place of ``sqlite3`` if it is installed in the same virtual environment. This is useful for Python environments with either an outdated version of SQLite or with restrictions on SQLite such as disabled extension loading or restrictions resulting in the ``sqlite3.OperationalError: table sqlite_master may not be modified`` error. (:issue:`559`) +- New ``with db.ensure_autocommit_off()`` context manager, which ensures that the database is in autocommit mode for the duration of a block of code. This is used by ``db.enable_wal()`` and ``db.disable_wal()`` to ensure they work correctly with ``pysqlite3`` and ``sqlean.py``. +- New ``db.iterdump()`` method, providing an iterator over SQL strings representing a dump of the database. This uses ``sqlite-dump`` if it is available, otherwise falling back on the ``conn.iterdump()`` method from ``sqlite3``. Both ``pysqlite3`` and ``sqlean.py`` omit support for ``iterdump()`` - this method helps paper over that difference. + .. _v3_32_1: 3.32.1 (2023-05-21) diff --git a/setup.py b/setup.py index 5f4ea04..1131db6 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup, find_packages import io import os -VERSION = "3.32.1" +VERSION = "3.33" def get_long_description():