You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
Regular views can now be written as async functions, but instances of the View and MethodView classes did not get updated to support this functionality. Consider the following example:
The expectation is that you should be able to send requests to /test and /test2 and that their respective handlers should be wrapped with the app.ensure_sync() method, as function-based handlers are.
Instead sending requests to these URLs cause the following error:
TypeError: The view function did not return a valid response. The return type must be a string, dict, tuple, Response instance, or WSGI callable, but it was a coroutine.
Environment:
Python version: >= 3.7
Flask version: >= 2
The text was updated successfully, but these errors were encountered:
Regular views can now be written as async functions, but instances of the
View
andMethodView
classes did not get updated to support this functionality. Consider the following example:The expectation is that you should be able to send requests to
/test
and/test2
and that their respective handlers should be wrapped with theapp.ensure_sync()
method, as function-based handlers are.Instead sending requests to these URLs cause the following error:
Environment:
The text was updated successfully, but these errors were encountered: