Silence the deprecation warnings our own code raises
Starlette renamed HTTP_422_UNPROCESSABLE_ENTITY to HTTP_422_UNPROCESSABLE_CONTENT and now warns on the old spelling; the value is unchanged at 422, so the 20 call sites in the routers move over with no wire-format or frontend impact. Alembic >=1.16 supersedes version_path_separator with path_separator, which governs both prepend_sys_path and version_locations, and warns when it is absent. Together this takes pytest from 26 deprecation warnings to 6. The remainder are slowapi calling asyncio.iscoroutinefunction; they are left visible deliberately, with no filterwarnings entry, as a reminder to revisit once upstream ships a fix. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -83,7 +83,7 @@ async def create_child(
|
||||
)
|
||||
return _child_to_response(child)
|
||||
except ValidationError as exc:
|
||||
raise HTTPException(status.HTTP_422_UNPROCESSABLE_ENTITY, str(exc)) from exc
|
||||
raise HTTPException(status.HTTP_422_UNPROCESSABLE_CONTENT, str(exc)) from exc
|
||||
|
||||
|
||||
@child_router.get("/{child_id}", response_model=ChildResponse)
|
||||
@@ -130,7 +130,7 @@ async def update_child(
|
||||
)
|
||||
return _child_to_response(child)
|
||||
except ValidationError as exc:
|
||||
raise HTTPException(status.HTTP_422_UNPROCESSABLE_ENTITY, str(exc)) from exc
|
||||
raise HTTPException(status.HTTP_422_UNPROCESSABLE_CONTENT, str(exc)) from exc
|
||||
except NotFoundError as exc:
|
||||
raise HTTPException(status.HTTP_404_NOT_FOUND, str(exc)) from exc
|
||||
|
||||
@@ -164,6 +164,6 @@ async def update_parent_settings(
|
||||
)
|
||||
return PersonalDataResponse.from_entity(updated)
|
||||
except ValidationError as exc:
|
||||
raise HTTPException(status.HTTP_422_UNPROCESSABLE_ENTITY, str(exc)) from exc
|
||||
raise HTTPException(status.HTTP_422_UNPROCESSABLE_CONTENT, str(exc)) from exc
|
||||
except NotFoundError as exc:
|
||||
raise HTTPException(status.HTTP_404_NOT_FOUND, str(exc)) from exc
|
||||
|
||||
Reference in New Issue
Block a user