feat: drop python 3.10 support

dropped python3.10, updated pyproject and dependencies, and also removed some blocks of code with special handling for enum.StrEnum

Signed-off-by: Charlie Doern <cdoern@redhat.com>
This commit is contained in:
Charlie Doern 2025-06-18 10:16:27 -04:00
parent 7d812e3bf0
commit 12d860744d
32 changed files with 63 additions and 104 deletions

View file

@ -6,7 +6,7 @@
import json
import time
from datetime import datetime, timedelta, timezone
from datetime import UTC, datetime, timedelta
from starlette.types import ASGIApp, Receive, Scope, Send
@ -79,7 +79,7 @@ class QuotaMiddleware:
if int(prev) == 0:
# Set with expiration datetime when it is the first request in the window.
expiration = datetime.now(timezone.utc) + timedelta(seconds=self.window_seconds)
expiration = datetime.now(UTC) + timedelta(seconds=self.window_seconds)
await kv.set(key, str(count), expiration=expiration)
else:
await kv.set(key, str(count))