mirror of https://github.com/tiangolo/fastapi.git
⬆️ Upgrade Starlette to 0.12.9 and add State (#593)
This commit is contained in:
parent
dfec2d7644
commit
6c7da43e51
2
Pipfile
2
Pipfile
|
|
@ -25,7 +25,7 @@ sqlalchemy = "*"
|
|||
uvicorn = "*"
|
||||
|
||||
[packages]
|
||||
starlette = "==0.12.8"
|
||||
starlette = "==0.12.9"
|
||||
pydantic = "==0.32.2"
|
||||
databases = {extras = ["sqlite"],version = "*"}
|
||||
hypercorn = "*"
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ from fastapi.openapi.docs import (
|
|||
from fastapi.openapi.utils import get_openapi
|
||||
from fastapi.params import Depends
|
||||
from starlette.applications import Starlette
|
||||
from starlette.datastructures import State
|
||||
from starlette.exceptions import ExceptionMiddleware, HTTPException
|
||||
from starlette.middleware.errors import ServerErrorMiddleware
|
||||
from starlette.requests import Request
|
||||
|
|
@ -42,6 +43,7 @@ class FastAPI(Starlette):
|
|||
) -> None:
|
||||
self.default_response_class = default_response_class
|
||||
self._debug = debug
|
||||
self.state = State()
|
||||
self.router: routing.APIRouter = routing.APIRouter(
|
||||
routes, dependency_overrides_provider=self
|
||||
)
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ classifiers = [
|
|||
"Topic :: Internet :: WWW/HTTP :: HTTP Servers",
|
||||
]
|
||||
requires = [
|
||||
"starlette >=0.11.1,<=0.12.8",
|
||||
"starlette >=0.12.9,<=0.12.9",
|
||||
"pydantic >=0.32.2,<=0.32.2"
|
||||
]
|
||||
description-file = "README.md"
|
||||
|
|
|
|||
Loading…
Reference in New Issue