fix: replace datetime.UTC with timezone.utc for Python 3.10 compatibility

datetime.UTC was introduced in Python 3.11. Users on 3.10 get an ImportError.
Also lower ruff/mypy target-version from py313 to py310 to match minimum supported version.
This commit is contained in:
Pouzor
2026-03-09 22:01:32 +01:00
parent 99b40fa9e9
commit 6ae7f7768f
6 changed files with 14 additions and 14 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
import uuid
from datetime import UTC, datetime
from datetime import datetime, timezone
from typing import Any
from sqlalchemy import JSON, Boolean, DateTime, Float, ForeignKey, Integer, String, Text
@@ -9,7 +9,7 @@ from app.db.database import Base
def _now() -> datetime:
return datetime.now(UTC)
return datetime.now(timezone.utc)
def _uuid() -> str: