Skip to content

Commit 6c7da43

Browse files
authored
⬆️ Upgrade Starlette to 0.12.9 and add State (fastapi#593)
1 parent dfec2d7 commit 6c7da43

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

Pipfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ sqlalchemy = "*"
2525
uvicorn = "*"
2626

2727
[packages]
28-
starlette = "==0.12.8"
28+
starlette = "==0.12.9"
2929
pydantic = "==0.32.2"
3030
databases = {extras = ["sqlite"],version = "*"}
3131
hypercorn = "*"

fastapi/applications.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
from fastapi.openapi.utils import get_openapi
1616
from fastapi.params import Depends
1717
from starlette.applications import Starlette
18+
from starlette.datastructures import State
1819
from starlette.exceptions import ExceptionMiddleware, HTTPException
1920
from starlette.middleware.errors import ServerErrorMiddleware
2021
from starlette.requests import Request
@@ -42,6 +43,7 @@ def __init__(
4243
) -> None:
4344
self.default_response_class = default_response_class
4445
self._debug = debug
46+
self.state = State()
4547
self.router: routing.APIRouter = routing.APIRouter(
4648
routes, dependency_overrides_provider=self
4749
)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ classifiers = [
1919
"Topic :: Internet :: WWW/HTTP :: HTTP Servers",
2020
]
2121
requires = [
22-
"starlette >=0.11.1,<=0.12.8",
22+
"starlette >=0.12.9,<=0.12.9",
2323
"pydantic >=0.32.2,<=0.32.2"
2424
]
2525
description-file = "README.md"

0 commit comments

Comments
 (0)