Skip to content

Commit d4d8e87

Browse files
authored
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: zmievsa/cadwyn#316
1 parent 98aa59b commit d4d8e87

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

airflow-core/pyproject.toml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,20 +77,15 @@ dependencies = [
7777
"argcomplete>=1.10",
7878
"asgiref>=2.3.0",
7979
"attrs>=22.1.0, !=25.2.0",
80-
"cadwyn>=5.6.2",
80+
"cadwyn>=6.0.0",
8181
"colorlog>=6.8.2",
8282
"cron-descriptor>=1.2.24",
8383
"croniter>=2.0.2",
8484
# TODO(potiuk): We should bump cryptography to >=46.0.0 when sqlalchemy>=2.0 is required
8585
"cryptography>=41.0.0,<46.0.0",
8686
"deprecated>=1.2.13",
8787
"dill>=0.2.2",
88-
# Cadwyn is not compatible with FastAPI 0.128.0 due to dropping of Pydantic v1 and Cadwyn using some
89-
# internal methods dropped in FastAPI 0.128.0. Tracked in https://github.com/zmievsa/cadwyn/issues/316
90-
# We will also have to fix `task-sdk/dev/generate_task_sdk_models.py` script as we are mocking removed
91-
# _get_long_model_name method there once Cadwyn releases a new version - we should find a better way
92-
# to override long model name (if it is still needed) without relying on private methods.
93-
"fastapi[standard-no-fastapi-cloud-cli]>=0.127.0,<0.128.0",
88+
"fastapi[standard-no-fastapi-cloud-cli]>=0.128.0",
9489
"uvicorn>=0.37.0",
9590
"starlette>=0.45.0",
9691
"httpx>=0.25.0",

task-sdk/dev/generate_task_sdk_models.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import os
2121
import sys
2222
from pathlib import Path
23-
from unittest import mock
2423

2524
import httpx
2625
from datamodel_code_generator import (
@@ -76,7 +75,6 @@ def load_config():
7675
return cfg
7776

7877

79-
@mock.patch("fastapi._compat.v2.get_long_model_name", lambda model: model.__name__)
8078
def generate_file():
8179
from airflow.api_fastapi.execution_api.app import InProcessExecutionAPI
8280

0 commit comments

Comments
 (0)