Skip to content

Commit 0462e12

Browse files
authored
build(deps): fix building with peewee 4 (#133)
1 parent 40fccd0 commit 0462e12

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

aw_datastore/storages/peewee.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@
1313
from aw_core.dirs import get_data_dir
1414
from aw_core.models import Event
1515
from playhouse.migrate import SqliteMigrator, migrate
16-
from playhouse.sqlite_ext import SqliteExtDatabase
16+
try:
17+
from playhouse.sqlite_ext import SqliteExtDatabase
18+
except ImportError:
19+
# peewee 4 is missing SqliteExtDatabase
20+
from peewee import SqliteDatabase as SqliteExtDatabase
1721

1822
import peewee
1923
from peewee import (

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ aw-cli = "aw_cli.__main__:main"
2222
[tool.poetry.dependencies]
2323
python = "^3.8"
2424
jsonschema = "^4.3"
25-
peewee = "3.*"
25+
peewee = ">=3.0.0,<5.0.0"
2626
platformdirs = "3.10" # pinned due to sometimes breaking changes in minor versions: https://github.com/ActivityWatch/aw-core/pull/122#issuecomment-1768020335
2727
iso8601 = "*"
2828
rfc3339-validator = "^0.1.4" # needed for the date-type format in jsonschema

0 commit comments

Comments
 (0)