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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user