unknowntpo commented on code in PR #60382:
URL: https://github.com/apache/airflow/pull/60382#discussion_r2679222454


##########
airflow-core/src/airflow/api_fastapi/compat.py:
##########


Review Comment:
   I think we still need this try-catch. 
   
   The try/except in `compat.py` is for backward compatibility with older 
FastAPI versions 
   when running "Low dep tests" (`uv sync --resolution lowest-direct`). 
   
   FastAPI 0.128.0 (our minimum version) requires starlette>=0.40.0. With "Low 
dep tests"
   (uv sync --resolution lowest-direct), starlette 0.40.0 is installed, which 
only has
   `HTTP_422_UNPROCESSABLE_ENTITY`. So we need this fallback for backward 
compatibility.
   
   Note that the `HTTP_422_UNPROCESSABLE_ENTITY` was deprecated in Starlette 
0.48.0 and renamed to 
   `HTTP_422_UNPROCESSABLE_CONTENT` to align with RFC 9110 (HTTP Semantics).
   
   References:
   - Starlette release notes: https://www.starlette.io/release-notes/
   - RFC 9110: https://www.rfc-editor.org/rfc/rfc9110#status.422
   - failed CI: Lowest Deps test: 
https://github.com/apache/airflow/actions/runs/20886590921/job/60010997212?pr=60382#step:8:14217



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to