โ† pod_r4_v1g

fastapi_14448

failed NO_PATCH NO_PATCH UNSUBMITTED empty_patch(timeout) ยท 22 tool calls ยท 0 s ยท fastapi/fastapi

Task input

๐Ÿ› Fix support for functools wraps and partial combined, for async and regular functions and classes in path operations and dependencies

๐Ÿ› Fix support for functools wraps and partial combined, for async and regular functions and classes in path operations and dependencies

This also uses and extends the tests created by @YuriiMotov :raised_hands: 

Should fix / related to: https://github.com/fastapi/fastapi/issues/14444

The new tests simulate the multiple combinations of how decorators could affect dependencies and path operation functions (endpoints).

The logic to analyze if a function is an async, generator, async generator,  callable instance, etc. now also checks and unwraps and extracts partials in all those levels.

The main case is when the callable is an _async_ something (function, generator, etc) because then it needs to be awaited.

But the original function could be async or not, the wrapper could be async or not. if either is async, then it has to be awaited, no matter if the other is not async. So, analyzing only the last point in the chain is not enough, it's necessary to analyze the function but also the wrapper.

This PR implements and tests all that, all those combinations.

Tool calls (0)

#ToolArgumentsResult
No trace captured.