This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch v3-2-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/v3-2-test by this push:
new 85339188eab Fix Starlette 1.0.0 compatibility in TemplateResponse
calls (#64116) (#64300) (#66676)
85339188eab is described below
commit 85339188eab4a14813f2338cc24e57701ad781aa
Author: Jarek Potiuk <[email protected]>
AuthorDate: Mon May 11 00:58:47 2026 +0200
Fix Starlette 1.0.0 compatibility in TemplateResponse calls (#64116)
(#64300) (#66676)
Starlette 1.0.0 removed the deprecated TemplateResponse(name, context)
signature where request was passed inside the context dict. Update both
call sites to use the new signature TemplateResponse(request, name, context)
and remove the temporary starlette<1 upper bound added in #64115.
closes: #64116
(cherry picked from commit 90deddd00c54b3f883f215a232fe1524e6f7236f)
Co-authored-by: Yu-Hong Shen <[email protected]>
Co-authored-by: Yu-Hong Shen <[email protected]>
---
airflow-core/pyproject.toml | 4 +---
.../airflow/api_fastapi/auth/managers/simple/simple_auth_manager.py | 3 ++-
airflow-core/src/airflow/api_fastapi/core_api/app.py | 3 ++-
uv.lock | 4 ++--
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/airflow-core/pyproject.toml b/airflow-core/pyproject.toml
index de79288f3b4..cd6d2ae9d38 100644
--- a/airflow-core/pyproject.toml
+++ b/airflow-core/pyproject.toml
@@ -96,9 +96,7 @@ dependencies = [
"dill>=0.2.2",
"fastapi[standard-no-fastapi-cloud-cli]>=0.129.0",
"uvicorn>=0.37.0",
- # Starlette 1.0.0 breaks the API server. Needs more investigation
- # https://github.com/apache/airflow/issues/64116
- "starlette>=0.45.0,<1",
+ "starlette>=0.45.0",
"httpx>=0.25.0",
'importlib_metadata>=6.5;python_version<"3.12"',
'importlib_metadata>=7.0;python_version>="3.12"',
diff --git
a/airflow-core/src/airflow/api_fastapi/auth/managers/simple/simple_auth_manager.py
b/airflow-core/src/airflow/api_fastapi/auth/managers/simple/simple_auth_manager.py
index 0982f501863..55a8d7d58b4 100644
---
a/airflow-core/src/airflow/api_fastapi/auth/managers/simple/simple_auth_manager.py
+++
b/airflow-core/src/airflow/api_fastapi/auth/managers/simple/simple_auth_manager.py
@@ -354,8 +354,9 @@ class
SimpleAuthManager(BaseAuthManager[SimpleAuthManagerUser]):
@app.get("/{rest_of_path:path}", response_class=HTMLResponse,
include_in_schema=False)
def webapp(request: Request, rest_of_path: str):
return templates.TemplateResponse(
+ request,
"/index.html",
- {"request": request, "backend_server_base_url":
request.base_url.path},
+ {"backend_server_base_url": request.base_url.path},
media_type="text/html",
)
diff --git a/airflow-core/src/airflow/api_fastapi/core_api/app.py
b/airflow-core/src/airflow/api_fastapi/core_api/app.py
index 2622aec86b9..16719e3f6d5 100644
--- a/airflow-core/src/airflow/api_fastapi/core_api/app.py
+++ b/airflow-core/src/airflow/api_fastapi/core_api/app.py
@@ -100,8 +100,9 @@ def init_views(app: FastAPI) -> None:
@app.get("/{rest_of_path:path}", response_class=HTMLResponse,
include_in_schema=False)
def webapp(request: Request, rest_of_path: str):
return templates.TemplateResponse(
+ request,
"/index.html",
- {"request": request, "backend_server_base_url":
request.base_url.path},
+ {"backend_server_base_url": request.base_url.path},
media_type="text/html",
)
diff --git a/uv.lock b/uv.lock
index 6947c61649d..ddddce765c0 100644
--- a/uv.lock
+++ b/uv.lock
@@ -97,9 +97,9 @@ apache-airflow-providers-mongo = false
apache-airflow-providers-apprise = false
apache-airflow-providers-apache-impala = false
apache-airflow-ctl = false
-apache-airflow-providers-zendesk = false
apache-airflow-providers-github = false
apache-airflow-providers-snowflake = false
+apache-airflow-providers-zendesk = false
apache-airflow-providers-presto = false
apache-airflow-providers-airbyte = false
apache-airflow-providers-apache-hive = false
@@ -1947,7 +1947,7 @@ requires-dist = [
{ name = "rich-argparse", specifier = ">=1.0.0" },
{ name = "setproctitle", specifier = ">=1.3.3" },
{ name = "sqlalchemy", extras = ["asyncio"], specifier = ">=2.0.48" },
- { name = "starlette", specifier = ">=0.45.0,<1" },
+ { name = "starlette", specifier = ">=0.45.0" },
{ name = "statsd", marker = "extra == 'statsd'", specifier = ">=3.3.0" },
{ name = "structlog", specifier = ">=25.4.0" },
{ name = "svcs", specifier = ">=25.1.0" },