Blob Blame History Raw
From bb7de819d148b3b60540490593e517ce3b23f7e2 Mon Sep 17 00:00:00 2001
From: Shayne Hartford <shaybox@shaybox.com>
Date: Tue, 19 Jul 2022 03:35:07 -0400
Subject: [PATCH 1/3] Update pyproject.toml

---
 pyproject.toml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pyproject.toml b/pyproject.toml
index 5ffdf93ad3..8bf03dd632 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -35,7 +35,7 @@ classifiers = [
     "Topic :: Internet :: WWW/HTTP",
 ]
 requires = [
-    "starlette==0.19.1",
+    "starlette==0.20.4",
     "pydantic >=1.6.2,!=1.7,!=1.7.1,!=1.7.2,!=1.7.3,!=1.8,!=1.8.1,<2.0.0",
 ]
 description-file = "README.md"

From ec378eebd9072b3f20d53222a0d4bf3142e2b5b2 Mon Sep 17 00:00:00 2001
From: Shayne Hartford <shaybox@shaybox.com>
Date: Tue, 19 Jul 2022 03:35:58 -0400
Subject: [PATCH 2/3] Update applications.py

---
 fastapi/applications.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fastapi/applications.py b/fastapi/applications.py
index 7530ddb9b8..b651c92483 100644
--- a/fastapi/applications.py
+++ b/fastapi/applications.py
@@ -33,9 +33,10 @@
 from fastapi.utils import generate_unique_id
 from starlette.applications import Starlette
 from starlette.datastructures import State
-from starlette.exceptions import ExceptionMiddleware, HTTPException
+from starlette.exceptions import HTTPException
 from starlette.middleware import Middleware
 from starlette.middleware.errors import ServerErrorMiddleware
+from starlette.middleware.exceptions import ExceptionMiddleware
 from starlette.requests import Request
 from starlette.responses import HTMLResponse, JSONResponse, Response
 from starlette.routing import BaseRoute

From 311ff1f056ff9daefb5b8b87f8a46f221ba03bc5 Mon Sep 17 00:00:00 2001
From: Shayne Hartford <shaybox@shaybox.com>
Date: Tue, 19 Jul 2022 03:50:49 -0400
Subject: [PATCH 3/3] Update api_key.py

---
 fastapi/security/api_key.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fastapi/security/api_key.py b/fastapi/security/api_key.py
index 36ab60e30f..bca5c721a6 100644
--- a/fastapi/security/api_key.py
+++ b/fastapi/security/api_key.py
@@ -27,7 +27,7 @@ def __init__(
         self.auto_error = auto_error
 
     async def __call__(self, request: Request) -> Optional[str]:
-        api_key: str = request.query_params.get(self.model.name)
+        api_key = request.query_params.get(self.model.name)
         if not api_key:
             if self.auto_error:
                 raise HTTPException(