Browse Source
Replace deprecated `asyncio.iscoroutinefunction` with `inspect.iscoroutinefunction`
Deprecated in Python 3.14 and will be removed in Python 3.16.
pull/13890/head
Edgar Ramírez Mondragón
3 weeks ago
No known key found for this signature in database
GPG Key ID: 74C40D09C7B42099
1 changed files with
1 additions and
1 deletions
-
fastapi/routing.py
|
|
@ -231,7 +231,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 = asyncio.iscoroutinefunction(dependant.call) |
|
|
|
is_coroutine = inspect.iscoroutinefunction(dependant.call) |
|
|
|
is_body_form = body_field and isinstance(body_field.field_info, params.Form) |
|
|
|
if isinstance(response_class, DefaultPlaceholder): |
|
|
|
actual_response_class: Type[Response] = response_class.value |
|
|
|