From 40508b9f6ed0e0a4f6ffb0a22b27158a6d333510 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Wojni=C5=82owicz?= Date: Sun, 19 Apr 2026 09:43:21 +0200 Subject: [PATCH] build(deps): fix building with peewee 4 --- aw_datastore/storages/peewee.py | 6 +++++- pyproject.toml | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/aw_datastore/storages/peewee.py b/aw_datastore/storages/peewee.py index 5110eed..b04ac9c 100644 --- a/aw_datastore/storages/peewee.py +++ b/aw_datastore/storages/peewee.py @@ -13,7 +13,11 @@ from aw_core.dirs import get_data_dir from aw_core.models import Event from playhouse.migrate import SqliteMigrator, migrate -from playhouse.sqlite_ext import SqliteExtDatabase +try: + from playhouse.sqlite_ext import SqliteExtDatabase +except ImportError: + # peewee 4 is missing SqliteExtDatabase + from peewee import SqliteDatabase as SqliteExtDatabase import peewee from peewee import ( diff --git a/pyproject.toml b/pyproject.toml index d6acc51..983a14a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,7 +22,7 @@ aw-cli = "aw_cli.__main__:main" [tool.poetry.dependencies] python = "^3.8" jsonschema = "^4.3" -peewee = "3.*" +peewee = ">=3.0.0,<5.0.0" platformdirs = "3.10" # pinned due to sometimes breaking changes in minor versions: https://github.com/ActivityWatch/aw-core/pull/122#issuecomment-1768020335 iso8601 = "*" rfc3339-validator = "^0.1.4" # needed for the date-type format in jsonschema