Skip to content

Commit 732bbf4

Browse files
authored
Merge pull request #33 from vaari-dev/base-image
Base image python:3.13-slim-trixie
2 parents 638aa25 + a78b7df commit 732bbf4

4 files changed

Lines changed: 8 additions & 5 deletions

File tree

‎.github/workflows/checks.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- uses: actions/checkout@v7
2020
- uses: actions/setup-python@v7
2121
with:
22-
python-version: '3.12'
22+
python-version: '3.13'
2323
cache: pip
2424
cache-dependency-path: pyproject.toml
2525
- run: pip install -e '.[dev]'

‎Dockerfile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.12-slim-bookworm
1+
FROM python:3.13-slim-trixie
22

33
# uid 1001 owns the existing /data volume
44
RUN apt-get update && apt-get install -y --no-install-recommends tini && rm -rf /var/lib/apt/lists/* \

‎pyproject.toml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "grocerybot"
33
version = "0.1.0"
44
description = "Order groceries online from Telegram voice notes"
5-
requires-python = ">=3.12"
5+
requires-python = ">=3.13"
66
dependencies = ["structlog>=25"]
77

88
[project.optional-dependencies]
@@ -21,7 +21,7 @@ where = ["src"]
2121

2222
[tool.ruff]
2323
line-length = 120
24-
target-version = "py312"
24+
target-version = "py313"
2525

2626
[tool.ruff.lint]
2727
select = ["E", "F", "W", "I", "B", "UP", "S", "SIM", "RUF"]

‎tests/test_bot.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,10 @@ def shop(bot, monkeypatch):
200200

201201

202202
def tap(bot, hh, offer=None, uid=NEW, household=None):
203-
chat_id, message_id = offer or hh.ledger().offer()
203+
deadline = time.monotonic() + 5
204+
while not (offer := offer or hh.ledger().offer()) and time.monotonic() < deadline: # recorded just after it is sent
205+
time.sleep(0.01)
206+
chat_id, message_id = offer
204207
data = f"now:{household or hh.id}"
205208
bot._on_button(
206209
{"id": "q", "from": {"id": uid}, "data": data, "message": {"chat": {"id": chat_id}, "message_id": message_id}}

0 commit comments

Comments
 (0)