Browse Source

⬆️ Upgrade Starlette to 0.12.9 and add State (#593)

pull/598/head
Sebastián Ramírez 6 years ago
committed by GitHub
parent
commit
6c7da43e51
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      Pipfile
  2. 2
      fastapi/applications.py
  3. 2
      pyproject.toml

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 = "*"

2
fastapi/applications.py

@ -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
)

2
pyproject.toml

@ -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…
Cancel
Save