From f6d73112c8368cd6eb2ac596966e8148747c7b4e Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Thu, 13 Aug 2026 16:52:03 -0700 Subject: [PATCH] Fix for sqlite-utils 4.2 crashing bug (#843) - Remove from typing_extensions import Self - Smoke test: uv run --no-default-groups sqlite-utils --help Closes #842 --- .github/workflows/test.yml | 5 +++++ sqlite_utils/db.py | 4 +--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6c720a1..5924fd8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -53,6 +53,11 @@ jobs: run: | pip install uv uv run ty check sqlite_utils + - name: Check no accidental dev= dependencies needed + if: matrix.os == 'ubuntu-latest' + run: | + pip install uv + uv run --no-default-groups sqlite-utils --help - name: Check formatting run: black . --check - name: Check if cog needs to be run diff --git a/sqlite_utils/db.py b/sqlite_utils/db.py index 37825bb..c011d9b 100644 --- a/sqlite_utils/db.py +++ b/sqlite_utils/db.py @@ -24,8 +24,6 @@ from typing import ( ) from sqlite_fts4 import rank_bm25 -from typing_extensions import Self - from sqlite_utils.plugins import ensure_plugins_loaded, pm from .create_table_parser import ( @@ -637,7 +635,7 @@ class Database: pm.hook.prepare_connection(conn=self.conn) self.strict = strict - def __enter__(self) -> Self: + def __enter__(self): return self def __exit__(