Skip to content

Conversation

fajpunk
Copy link
Member

@fajpunk fajpunk commented Sep 17, 2025

  /home/danfuchs/src/noteburst/.tox/py/lib/python3.13/site-packages/safir/fastapi/_errors.py:19: DeprecationWarning: 'HTTP_422_UNPROCESSABLE_ENTITY' is deprecated. Use 'HTTP_422_UNPROCESSABLE_CONTENT' instead.
    class ClientRequestError(SlackIgnoredException):

Starlette deprecated the HTTP_422_UNPROCESSABLE_ENTITY constant and changed it to HTTP_422_UNPROCESSABLE_CONTENT in this PR. We could either change this constant in our code, or just use the status code int directly.

This PR uses status code directly here rather than the new constant in to avoid having to increase the lower bound on starlette. This is the choice that the FastAPI folks made in this
PR
.

Starlette deprecated the `HTTP_422_UNPROCESSABLE_ENTITY` constant and
changed it to `HTTP_422_UNPROCESSABLE_CONTENT` in [this
PR](Kludex/starlette#2939). We could either
change this constant in our code, or just use the status code int
directly.

This PR uses status code directly here rather than the new constant in
to avoid having to increase the lower bound on starlette. This is the
choice that the FastAPI folks made in [this
PR](https://github.com/fastapi/fastapi/pull/14077/files).
Copy link
Member

@jonathansick jonathansick left a comment

Choose a reason for hiding this comment

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

Good idea.

@fajpunk fajpunk merged commit 1b6c4dd into main Sep 17, 2025
12 of 15 checks passed
@fajpunk fajpunk deleted the tickets/DM-52550/starlette-warning branch September 17, 2025 16:04
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.

2 participants