mirror of
https://github.com/fastapi-users/fastapi-users.git
synced 2025-11-02 04:05:19 +08:00
Drop Python 3.8 support
This commit is contained in:
@ -1,5 +1,3 @@
|
||||
from typing import List
|
||||
|
||||
import motor.motor_asyncio
|
||||
from beanie import Document
|
||||
from fastapi_users.db import BaseOAuthAccount, BeanieBaseUser, BeanieUserDatabase
|
||||
@ -17,7 +15,7 @@ class OAuthAccount(BaseOAuthAccount):
|
||||
|
||||
|
||||
class User(BeanieBaseUser, Document):
|
||||
oauth_accounts: List[OAuthAccount] = Field(default_factory=list)
|
||||
oauth_accounts: list[OAuthAccount] = Field(default_factory=list)
|
||||
|
||||
|
||||
async def get_user_db():
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
from typing import AsyncGenerator
|
||||
from collections.abc import AsyncGenerator
|
||||
|
||||
from fastapi import Depends
|
||||
from fastapi_users.db import SQLAlchemyBaseUserTableUUID, SQLAlchemyUserDatabase
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
from typing import AsyncGenerator
|
||||
from collections.abc import AsyncGenerator
|
||||
|
||||
from fastapi import Depends
|
||||
from fastapi_users.db import SQLAlchemyBaseUserTableUUID, SQLAlchemyUserDatabase
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
from typing import AsyncGenerator, List
|
||||
from collections.abc import AsyncGenerator
|
||||
|
||||
from fastapi import Depends
|
||||
from fastapi_users.db import (
|
||||
@ -21,7 +21,7 @@ class OAuthAccount(SQLAlchemyBaseOAuthAccountTableUUID, Base):
|
||||
|
||||
|
||||
class User(SQLAlchemyBaseUserTableUUID, Base):
|
||||
oauth_accounts: Mapped[List[OAuthAccount]] = relationship(
|
||||
oauth_accounts: Mapped[list[OAuthAccount]] = relationship(
|
||||
"OAuthAccount", lazy="joined"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user