from datetime import datetime, timezone def utcnow() -> datetime: """Naive UTC now, via the non-deprecated API. Every datetime column in the schema is TIMESTAMP WITHOUT TIME ZONE, so the whole app speaks naive-UTC. Replacing datetime.utcnow() call sites with this helper removes the Python 3.12 deprecation without changing any stored value or comparison. When the columns move to TIMESTAMPTZ (Phase 2), this becomes `datetime.now(timezone.utc)` and the type change happens in exactly one place. """ return datetime.now(timezone.utc).replace(tzinfo=None)