This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new d4d8e870c0e Fix compatibility with FastAPI>=0.128.0 (#59872)
d4d8e870c0e is described below

commit d4d8e870c0e37e5feefddf60a5a03e25ea5f0dd1
Author: Jarek Potiuk <[email protected]>
AuthorDate: Sun Dec 28 19:58:19 2025 +0100

    Fix compatibility with FastAPI>=0.128.0 (#59872)
    
    As Cadwyn 6.0.0 is released with compatibility with FastAPI 0.128.0+,
    we can now attempt to run the tests with it and see what else needs
    to be fixed.
    
    Related: https://github.com/zmievsa/cadwyn/issues/316
---
 airflow-core/pyproject.toml              | 9 ++-------
 task-sdk/dev/generate_task_sdk_models.py | 2 --
 2 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/airflow-core/pyproject.toml b/airflow-core/pyproject.toml
index 0f5ef1bca77..3f3cfd996e4 100644
--- a/airflow-core/pyproject.toml
+++ b/airflow-core/pyproject.toml
@@ -77,7 +77,7 @@ dependencies = [
     "argcomplete>=1.10",
     "asgiref>=2.3.0",
     "attrs>=22.1.0, !=25.2.0",
-    "cadwyn>=5.6.2",
+    "cadwyn>=6.0.0",
     "colorlog>=6.8.2",
     "cron-descriptor>=1.2.24",
     "croniter>=2.0.2",
@@ -85,12 +85,7 @@ dependencies = [
     "cryptography>=41.0.0,<46.0.0",
     "deprecated>=1.2.13",
     "dill>=0.2.2",
-    # Cadwyn is not compatible with FastAPI 0.128.0 due to dropping of 
Pydantic v1 and Cadwyn using some
-    # internal methods dropped in FastAPI 0.128.0. Tracked in 
https://github.com/zmievsa/cadwyn/issues/316
-    # We will also have to fix `task-sdk/dev/generate_task_sdk_models.py` 
script as we are mocking removed
-    # _get_long_model_name method there once Cadwyn releases a new version - 
we should find a better way
-    # to override long model name (if it is still needed) without relying on 
private methods.
-    "fastapi[standard-no-fastapi-cloud-cli]>=0.127.0,<0.128.0",
+    "fastapi[standard-no-fastapi-cloud-cli]>=0.128.0",
     "uvicorn>=0.37.0",
     "starlette>=0.45.0",
     "httpx>=0.25.0",
diff --git a/task-sdk/dev/generate_task_sdk_models.py 
b/task-sdk/dev/generate_task_sdk_models.py
index 1070dfeb3c5..bb19fffc449 100644
--- a/task-sdk/dev/generate_task_sdk_models.py
+++ b/task-sdk/dev/generate_task_sdk_models.py
@@ -20,7 +20,6 @@ import json
 import os
 import sys
 from pathlib import Path
-from unittest import mock
 
 import httpx
 from datamodel_code_generator import (
@@ -76,7 +75,6 @@ def load_config():
     return cfg
 
 
[email protected]("fastapi._compat.v2.get_long_model_name", lambda model: 
model.__name__)
 def generate_file():
     from airflow.api_fastapi.execution_api.app import InProcessExecutionAPI
 

Reply via email to