Skip to content

Commit 1bb2e14

Browse files
committed
Bump fastapi to >=0.136.3 for Python >= 3.10 to fix PYSEC-2026-161
Signed-off-by: Ha Vu <ha@newmantle.tech>
1 parent 909ee91 commit 1bb2e14

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

pyproject.toml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,15 +134,19 @@ snowflake = [
134134
starrocks = ["pymysql"]
135135
trino = ["trino"]
136136
web = [
137-
"fastapi==0.120.1",
137+
# fastapi>=0.136.3 brings in starlette>=1.0.1, which fixes PYSEC-2026-161.
138+
# Both require Python >= 3.10, so 3.9 stays on the previous pin.
139+
"fastapi>=0.136.3; python_version >= '3.10'",
140+
"fastapi==0.120.1; python_version < '3.10'",
138141
"watchfiles>=0.19.0",
139142
"uvicorn[standard]==0.22.0",
140143
"sse-starlette>=0.2.2",
141144
"pyarrow",
142145
]
143146
lsp = [
144147
# Duplicate of web
145-
"fastapi==0.120.1",
148+
"fastapi>=0.136.3; python_version >= '3.10'",
149+
"fastapi==0.120.1; python_version < '3.10'",
146150
"watchfiles>=0.19.0",
147151
# "uvicorn[standard]==0.22.0",
148152
"sse-starlette>=0.2.2",

web/server/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def get_path_to_model_mapping(
9696

9797
def get_loaded_context(
9898
settings: Settings = Depends(get_settings),
99-
) -> t.Generator[Context, None]:
99+
) -> t.Generator[Context, None, None]:
100100
try:
101101
with get_loaded_context_lock:
102102
yield _get_loaded_context(settings.project_path, settings.config, settings.gateway)

0 commit comments

Comments
 (0)