-
Notifications
You must be signed in to change notification settings - Fork 16.3k
Refactor imports to use FastAPI modules instead of Starlette #58127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
sunank200
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many tests are failing
| except ValueError: | ||
| raise HTTPException( | ||
| status_code=status.HTTP_422_UNPROCESSABLE_ENTITY, | ||
| status_code=status.HTTP_422_UNPROCESSABLE_CONTENT, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC someone tried this before and it didn’t work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it was this one: #56564
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can use airflow.api_fastapi.compat.HTTP_422_UNPROCESSABLE_CONTENT instead now.
|
Are the imports considered equivalent? We should have some references from FastAPI for the import changes. |
pierrejeambrun
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, for some utility functions and classes, FastAPI just re-export the 'starlette' entities for convenience.
I think it's indeed better to use things from FastAPI instead whenever possible.
As long as the CI is happy i'm good with that.
Do you ming fixing the CI please?
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions. |
|
@chiuinggum Any chance you can address rebase the PR and fix the CI ? |
|
Closing in favor of #60382 that was merged. |
Why
Note
After this change, the remaining from

starletteimports are limited to the following^ 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.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.