⬆️ Upgrade Python to 3.14 (#2352)

This commit is contained in:
Sebastián Ramírez
2026-06-25 18:19:18 +02:00
committed by GitHub
parent a727535488
commit 14728b636c
14 changed files with 24 additions and 1083 deletions
+1 -2
View File
@@ -1,6 +1,6 @@
import secrets
import warnings
from typing import Annotated, Any, Literal
from typing import Annotated, Any, Literal, Self
from pydantic import (
AnyUrl,
@@ -12,7 +12,6 @@ from pydantic import (
model_validator,
)
from pydantic_settings import BaseSettings, SettingsConfigDict
from typing_extensions import Self
def parse_cors(v: Any) -> list[str] | str:
+2 -2
View File
@@ -1,4 +1,4 @@
from datetime import datetime, timedelta, timezone
from datetime import UTC, datetime, timedelta
from typing import Any
import jwt
@@ -20,7 +20,7 @@ ALGORITHM = "HS256"
def create_access_token(subject: str | Any, expires_delta: timedelta) -> str:
expire = datetime.now(timezone.utc) + expires_delta
expire = datetime.now(UTC) + expires_delta
to_encode = {"exp": expire, "sub": str(subject)}
encoded_jwt = jwt.encode(to_encode, settings.SECRET_KEY, algorithm=ALGORITHM)
return encoded_jwt