Drop Python 3.9 support

This commit is contained in:
François Voron
2025-10-25 08:19:03 +02:00
parent ae5ff025ef
commit fcf9a2041a
33 changed files with 224 additions and 234 deletions

View File

@ -1,4 +1,4 @@
from typing import Generic, Optional, Protocol
from typing import Generic, Protocol
from fastapi_users import models
from fastapi_users.manager import BaseUserManager
@ -10,8 +10,8 @@ class StrategyDestroyNotSupportedError(Exception):
class Strategy(Protocol, Generic[models.UP, models.ID]):
async def read_token(
self, token: Optional[str], user_manager: BaseUserManager[models.UP, models.ID]
) -> Optional[models.UP]: ... # pragma: no cover
self, token: str | None, user_manager: BaseUserManager[models.UP, models.ID]
) -> models.UP | None: ... # pragma: no cover
async def write_token(self, user: models.UP) -> str: ... # pragma: no cover