You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "hnomichith (via GitHub)" <gi...@apache.org> on 2025/11/03 17:41:08 UTC
[D] Incompatibility between Airflow 3.0.6 and FastAPI 0.121.0 [airflow]
GitHub user hnomichith created a discussion: Incompatibility between Airflow 3.0.6 and FastAPI 0.121.0
### Apache Airflow version
Other Airflow 2/3 version
### If "Other Airflow 2/3 version" selected, which one?
3.0.6
### What happened?
Hello,
Today, FastAPI released a new minor version, going from `0.120.4` to `0.121.0`.
This new release has moved the `is_async_gen_callable` method from `fastapi.dependants.utils` to being a method on the `fastapi.dependants.models.Dependant` data class.
It triggered an error from a project using Airflow 3.0.6:
```
ImportError while loading conftest '/home/runner/work/scraping-toolbox/scraping-toolbox/scraping-toolbox-core/tests/conftest.py'.
tests/conftest.py:6: in <module>
from airflow.utils.db import check, resetdb
.tox/py313-airflow30/lib/python3.13/site-packages/airflow/utils/db.py:59: in <module>
from airflow.utils.db_manager import RunDBManager
.tox/py313-airflow30/lib/python3.13/site-packages/airflow/utils/db_manager.py:26: in <module>
from airflow.api_fastapi.app import create_auth_manager
.tox/py313-airflow30/lib/python3.13/site-packages/airflow/api_fastapi/app.py:35: in <module>
from airflow.api_fastapi.execution_api.app import create_task_execution_api_app
.tox/py313-airflow30/lib/python3.13/site-packages/airflow/api_fastapi/execution_api/app.py:27: in <module>
from cadwyn import (
.tox/py313-airflow30/lib/python3.13/site-packages/cadwyn/__init__.py:3: in <module>
from .applications import Cadwyn
.tox/py313-airflow30/lib/python3.13/site-packages/cadwyn/applications.py:31: in <module>
from cadwyn.changelogs import CadwynChangelogResource, _generate_changelog
.tox/py313-airflow30/lib/python3.13/site-packages/cadwyn/changelogs.py:21: in <module>
from cadwyn.route_generation import _get_routes
.tox/py313-airflow30/lib/python3.13/site-packages/cadwyn/route_generation.py:34: in <module>
from cadwyn.schema_generation import (
.tox/py313-airflow30/lib/python3.13/site-packages/cadwyn/schema_generation.py:30: in <module>
from fastapi.dependencies.utils import is_async_gen_callable, is_coroutine_callable, is_gen_callable
E ImportError: cannot import name 'is_async_gen_callable' from 'fastapi.dependencies.utils' (/home/runner/work/scraping-toolbox/scraping-toolbox/scraping-toolbox-core/.tox/py313-airflow30/lib/python3.13/site-packages/fastapi/dependencies/utils.py)
py313-airflow30: exit 4 (4.45 seconds) /home/runner/work/scraping-toolbox/scraping-toolbox/scraping-toolbox-core> pytest pid=2405
py313-airflow30: FAIL code 4 (25.57=setup[21.12]+cmd[4.45] seconds)
evaluation failed :( (25.60 seconds)
```
I would guess the issue could be fixed [here](https://github.com/apache/airflow/blob/v3-0-stable/airflow-core/pyproject.toml#L86) by adding a maximum version ; but we could also consider fixing the import.
### What you think should happen instead?
Airflow 3.0 shouldn't have an incompatibility with FastAPI.
### How to reproduce
- Create a new folder
- Start a new Python virtual environment with whatever tool you prefer (I used Mise and UV)
- I installed `apache-airflow==3.0.6` with `uv add apache-airflow==3.0.6`.
- I checked fastapi version with `uv pip show fastapi`, it was indeed `fastapi==0.121.0`
- Then in the Python console, I reproducted the issue with `from airflow.utils.db import check, resetdb`
### Operating System
Ubuntu 24.04.3 LTS
### Versions of Apache Airflow Providers
apache-airflow-providers-common-compat==1.8.0
apache-airflow-providers-common-io==1.6.4
apache-airflow-providers-common-sql==1.28.2
apache-airflow-providers-smtp==2.3.1
apache-airflow-providers-standard==1.9.1
### Deployment
Astronomer
### Deployment details
_No response_
### Anything else?
_No response_
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [x] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
GitHub link: https://github.com/apache/airflow/discussions/57769
----
This is an automatically sent email for commits@airflow.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@airflow.apache.org
Re: [D] Incompatibility between Airflow 3.0.6 and FastAPI 0.121.0 [airflow]
Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
GitHub user boring-cyborg[bot] added a comment to the discussion: Incompatibility between Airflow 3.0.6 and FastAPI 0.121.0
Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.
GitHub link: https://github.com/apache/airflow/discussions/57769#discussioncomment-14861216
----
This is an automatically sent email for commits@airflow.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@airflow.apache.org
Re: [D] Incompatibility between Airflow 3.0.6 and FastAPI 0.121.0 [airflow]
Posted by "jharriman (via GitHub)" <gi...@apache.org>.
GitHub user jharriman deleted a comment on the discussion: Incompatibility between Airflow 3.0.6 and FastAPI 0.121.0
Hit this issue today after trying to upgrade FastAPI. Looks like the cadwyn bug (https://github.com/zmievsa/cadwyn/issues/305) has been marked closed, so is it now possible to remove the FastAPI constraint in airflow?
GitHub link: https://github.com/apache/airflow/discussions/57769#discussioncomment-15721129
----
This is an automatically sent email for commits@airflow.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@airflow.apache.org
Re: [D] Incompatibility between Airflow 3.0.6 and FastAPI 0.121.0 [airflow]
Posted by "jharriman (via GitHub)" <gi...@apache.org>.
GitHub user jharriman added a comment to the discussion: Incompatibility between Airflow 3.0.6 and FastAPI 0.121.0
Hit this issue today after trying to upgrade FastAPI. Looks like the cadwyn bug (https://github.com/zmievsa/cadwyn/issues/305) has been marked closed, so is it now possible to remove the FastAPI constraint in airflow?
GitHub link: https://github.com/apache/airflow/discussions/57769#discussioncomment-15721129
----
This is an automatically sent email for commits@airflow.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@airflow.apache.org