Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions fastapi/routing.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@
from typing_extensions import Annotated, deprecated

if sys.version_info >= (3, 13): # pragma: no cover
from inspect import iscoroutinefunction
pass
Comment thread
tiangolo marked this conversation as resolved.
else: # pragma: no cover
from asyncio import iscoroutinefunction
pass


# Copy of starlette.routing.request_response modified to include the
Expand Down Expand Up @@ -308,7 +308,7 @@ def get_request_handler(
embed_body_fields: bool = False,
) -> Callable[[Request], Coroutine[Any, Any, Response]]:
assert dependant.call is not None, "dependant.call must be a function"
is_coroutine = iscoroutinefunction(dependant.call)
is_coroutine = dependant.is_coroutine_callable
is_body_form = body_field and isinstance(
body_field.field_info, (params.Form, temp_pydantic_v1_params.Form)
)
Expand Down