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