diff --git a/4936.patch b/4936.patch deleted file mode 100644 index a1e5f20..0000000 --- a/4936.patch +++ /dev/null @@ -1,108 +0,0 @@ -From 2498888b90d3486ff9a5ecee0adb392f845964bb Mon Sep 17 00:00:00 2001 -From: Marcelo Trylesinski -Date: Sun, 22 May 2022 21:13:59 +0200 -Subject: [PATCH 1/4] Bump starlette from 0.20.0 to 0.21.0 - ---- - fastapi/applications.py | 3 ++- - pyproject.toml | 2 +- - 2 files changed, 3 insertions(+), 2 deletions(-) - -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 -diff --git a/pyproject.toml b/pyproject.toml -index 5ffdf93ad3..8ef9d24f7c 100644 ---- a/pyproject.toml -+++ b/pyproject.toml -@@ -35,7 +35,7 @@ classifiers = [ - "Topic :: Internet :: WWW/HTTP", - ] - requires = [ -- "starlette==0.19.1", -+ "starlette @ git+ssh://git@github.com/encode/starlette@master#egg=starlette", - "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 da0a23458acdbd0f184732eae5fbda200b13a3f3 Mon Sep 17 00:00:00 2001 -From: Marcelo Trylesinski -Date: Sun, 22 May 2022 21:17:41 +0200 -Subject: [PATCH 2/4] Correct Starlette master version - ---- - pyproject.toml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/pyproject.toml b/pyproject.toml -index 8ef9d24f7c..b4bff7299b 100644 ---- a/pyproject.toml -+++ b/pyproject.toml -@@ -35,7 +35,7 @@ classifiers = [ - "Topic :: Internet :: WWW/HTTP", - ] - requires = [ -- "starlette @ git+ssh://git@github.com/encode/starlette@master#egg=starlette", -+ "starlette @ git+https://github.com/encode/starlette.git#master", - "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 2851cfd615989a019601a4db194885b5b06dbbcc Mon Sep 17 00:00:00 2001 -From: Marcelo Trylesinski -Date: Sat, 28 May 2022 21:28:47 +0200 -Subject: [PATCH 3/4] Update pyproject.toml - ---- - pyproject.toml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/pyproject.toml b/pyproject.toml -index b4bff7299b..1b555f300e 100644 ---- a/pyproject.toml -+++ b/pyproject.toml -@@ -35,7 +35,7 @@ classifiers = [ - "Topic :: Internet :: WWW/HTTP", - ] - requires = [ -- "starlette @ git+https://github.com/encode/starlette.git#master", -+ "starlette==0.20.1", - "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 0b1b0e384ed98545e61651f46b38d8e68f3badf4 Mon Sep 17 00:00:00 2001 -From: Marcelo Trylesinski -Date: Sat, 28 May 2022 21:46:33 +0200 -Subject: [PATCH 4/4] Remove unnecessary cast - ---- - 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( diff --git a/5172.patch b/5172.patch new file mode 100644 index 0000000..1d39b23 --- /dev/null +++ b/5172.patch @@ -0,0 +1,71 @@ +From bb7de819d148b3b60540490593e517ce3b23f7e2 Mon Sep 17 00:00:00 2001 +From: Shayne Hartford +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 +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 +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( diff --git a/python-fastapi.spec b/python-fastapi.spec index 4c9ac6c..c2c46de 100644 --- a/python-fastapi.spec +++ b/python-fastapi.spec @@ -21,12 +21,9 @@ URL: https://github.com/tiangolo/fastapi Source0: %{url}/archive/%{version}/fastapi-%{version}.tar.gz BuildArch: noarch -# Bump starlette from 0.20.0 to 0.20.1 -# https://github.com/tiangolo/fastapi/pull/4936 -# -# This PR includes the changes to bump from 0.19.1 to 0.20.0, corresponding to -# https://github.com/tiangolo/fastapi/pull/4820. -Patch: %{url}/pull/4936.patch +# Bump starlette to 0.20.4 +# https://github.com/tiangolo/fastapi/pull/5172 +Patch: %{url}/pull/5172.patch # Fix sql_app_py39 and py310 tests # https://github.com/tiangolo/fastapi/pull/4409 @@ -320,8 +317,6 @@ sed -r -i 's/("types-(u|or)json\b.*",)/# \1/' pyproject.toml # Selectively allow newer versions for certain tightly-pinned dependencies: sed -r -i 's/("((databases|httpx|pytest)\b)[^<"]*),[[:blank:]]*<[^"]*/\1/' \ pyproject.toml -# Allow starlette 0.20.3: -sed -r -i 's/(==0\.20\.)1/\13/' pyproject.toml # Remove bundled js-termynal 0.0.1; since we are not building documentation, we # do this very bluntly: