Skip to content

Conversation

@potiuk
Copy link
Member

@potiuk potiuk commented Dec 27, 2025

…issue

Cadwyn is not compatible (yet) with FastAPI 0.128.0 - but the changes in FastAPI are deliberately breaking so there is no way we are going to support FastAPI >=0.128.0 unless there is a fix from Cadwyn (and we also need to fix generating models for task-sdk to not use private method that has been removed in FastAPI 0.128.0.

Therefore, it's better to upper-bind FastAPI rather than exclude it, because there might be more versions of FastAPI released before Cadwyn gets fixed.

Also the issue zmievsa/cadwyn#316 has been created, describing the root cause and suggested way how the issue could be fixed in Cadwyn and comment on the reason for upper binding was added to make sure we keep track of it.


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

…issue

Cadwyn is not compatible (yet) with FastAPI 0.128.0 - but the changes in
FastAPI are deliberately breaking so there is no way we are going to
support FastAPI >=0.128.0 unless there is a fix from Cadwyn (and we
also need to fix generating models for task-sdk to not use
private method that has been removed in FastAPI 0.128.0.

Therefore, it's better to upper-bind FastAPI rather than exclude it,
because there might be more versions of FastAPI released before
Cadwyn gets fixed.

Also the issue zmievsa/cadwyn#316 has been
created, describing the root cause and suggested way how the issue
could be fixed in Cadwyn and comment on the reason for upper binding
was added to make sure we keep track of it.
@potiuk
Copy link
Member Author

potiuk commented Dec 27, 2025

@jscheffl, @gopidesupavan -> I created the issue in Cadwyn zmievsa/cadwyn#316 , describing the issue and updated the exclusion from #59856 with link to the issue and <= rather than != as this is really something that we will only be able to get rid after Cadwyn releases a new version fixing the compatibility - so it's possible new versions of FastAPI will be released in-between

@pierrejeambrun -> I am not exactly sure about the reasoning of mocking the fastapi._compat.v2.get_long_model_name in our task-sdk/dev/generate_task_sdk_models.py - but since this method is now entirely removed from fastapi, and only Pydantic v2 route is going to be used, it's either not needed, or we'll have to do it differently. It seems it's been a dirty hack from the begginig anyway -> it was added here https://github.com/apache/airflow/pull/58524/changes

Copy link
Contributor

@jscheffl jscheffl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for cleaning-up behind my short term fix!

@jscheffl jscheffl merged commit 9941f18 into apache:main Dec 28, 2025
98 checks passed
amoghrajesh pushed a commit to astronomer/airflow that referenced this pull request Dec 29, 2025
apache#59859)

* Improve FastApi exclusion for Cadwyn incompatibility and link Cadwyn issue

Cadwyn is not compatible (yet) with FastAPI 0.128.0 - but the changes in
FastAPI are deliberately breaking so there is no way we are going to
support FastAPI >=0.128.0 unless there is a fix from Cadwyn (and we
also need to fix generating models for task-sdk to not use
private method that has been removed in FastAPI 0.128.0.

Therefore, it's better to upper-bind FastAPI rather than exclude it,
because there might be more versions of FastAPI released before
Cadwyn gets fixed.

Also the issue zmievsa/cadwyn#316 has been
created, describing the root cause and suggested way how the issue
could be fixed in Cadwyn and comment on the reason for upper binding
was added to make sure we keep track of it.

* Apply suggestion from @potiuk
@gopidesupavan
Copy link
Member

Thank you @potiuk

Subham-KRLX pushed a commit to Subham-KRLX/airflow that referenced this pull request Jan 2, 2026
apache#59859)

* Improve FastApi exclusion for Cadwyn incompatibility and link Cadwyn issue

Cadwyn is not compatible (yet) with FastAPI 0.128.0 - but the changes in
FastAPI are deliberately breaking so there is no way we are going to
support FastAPI >=0.128.0 unless there is a fix from Cadwyn (and we
also need to fix generating models for task-sdk to not use
private method that has been removed in FastAPI 0.128.0.

Therefore, it's better to upper-bind FastAPI rather than exclude it,
because there might be more versions of FastAPI released before
Cadwyn gets fixed.

Also the issue zmievsa/cadwyn#316 has been
created, describing the root cause and suggested way how the issue
could be fixed in Cadwyn and comment on the reason for upper binding
was added to make sure we keep track of it.

* Apply suggestion from @potiuk
stegololz pushed a commit to stegololz/airflow that referenced this pull request Jan 9, 2026
apache#59859)

* Improve FastApi exclusion for Cadwyn incompatibility and link Cadwyn issue

Cadwyn is not compatible (yet) with FastAPI 0.128.0 - but the changes in
FastAPI are deliberately breaking so there is no way we are going to
support FastAPI >=0.128.0 unless there is a fix from Cadwyn (and we
also need to fix generating models for task-sdk to not use
private method that has been removed in FastAPI 0.128.0.

Therefore, it's better to upper-bind FastAPI rather than exclude it,
because there might be more versions of FastAPI released before
Cadwyn gets fixed.

Also the issue zmievsa/cadwyn#316 has been
created, describing the root cause and suggested way how the issue
could be fixed in Cadwyn and comment on the reason for upper binding
was added to make sure we keep track of it.

* Apply suggestion from @potiuk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants