Compare commits

...

1 Commits

Author SHA1 Message Date
HAL9000 3bf9ceac1d refactor: fix FutureWarning by replacing datetime.utcnow() with timezone-aware alternative
Replaces deprecated datetime.datetime.utcnow() with datetime.datetime.now(timezone.utc)
in accordance with Python 3.12+ deprecation warnings.
2026-04-30 01:04:38 +00:00
2 changed files with 2 additions and 2 deletions
@@ -133,7 +133,7 @@ class LLMTrace(BaseModel):
description="Error message if the call failed",
)
timestamp: datetime = Field(
default_factory=datetime.utcnow,
default_factory=lambda: datetime.now(datetime.UTC),
description="When the trace was recorded",
)
@@ -218,7 +218,7 @@ class MetricEntry(BaseModel):
description="ULID of the plan this metric belongs to",
)
timestamp: datetime = Field(
default_factory=datetime.utcnow,
default_factory=lambda: datetime.now(datetime.UTC),
description="When the observation was recorded",
)
labels: dict[str, Any] = Field(