AttributeError while using HTTP_422_UPROCESSABLE_CONTENT from fastapi.status #14812
-
First Check
Commit to Help
Example Codefrom fastapi import status
bla = status.HTTP_422_UNPROCESSABLE_CONTENTDescriptionI upgraded my code to use I had checked the starlette documentation at that time and I expected FastAPI to pin lower limit of starlette to prevent breaking changes downstream. I got a failure on a machine where starlette 0.47.2 was being used and later found out that it was decided to not to pin the lower limit in #14077. I have resolved the issue at my end, but I did expect FastAPI to pin the lower limit and not cause issues downstream 😅 Operating SystemLinux Operating System DetailsNo response FastAPI Version0.128.0 Pydantic Version2.11.7 Python Version3.13.11 Additional ContextNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
FastAPI doesn't use neither I think you should fix this on your side by pinning the version of Starlette in your application's dependencies |
Beta Was this translation helpful? Give feedback.
FastAPI doesn't use neither
status.HTTP_422_UNPROCESSABLE_ENTITYnorstatus.HTTP_422_UNPROCESSABLE_CONTENTinternally. So, there is no incompatibility issue on FastAPI's side.I think you should fix this on your side by pinning the version of Starlette in your application's dependencies