feat: Upgrade to Python 3.12 (#4675)

Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
This commit is contained in:
Michael Genson
2024-12-04 22:31:26 -06:00
committed by GitHub
parent 0e6a40e210
commit 87504fbb05
43 changed files with 128 additions and 163 deletions

View File

@@ -2,7 +2,7 @@ from __future__ import annotations
import random
from collections.abc import Iterable
from datetime import datetime, timezone
from datetime import UTC, datetime
from math import ceil
from typing import Any, Generic, TypeVar
@@ -70,7 +70,7 @@ class RepositoryGeneric(Generic[Schema, Model]):
return self._household_id
def _random_seed(self) -> str:
return str(datetime.now(tz=timezone.utc))
return str(datetime.now(tz=UTC))
def _log_exception(self, e: Exception) -> None:
self.logger.error(f"Error processing query for Repo model={self.model.__name__} schema={self.schema.__name__}")