forked from orbit-oss/flask
Firstly `run_sync` was a misleading name as it didn't run anything, instead I think `async_to_sync` is much clearer as it converts a coroutine function to a function. (Name stolen from asgiref). Secondly trying to run the ensure_sync during registration made the code more complex and brittle, e.g. the _flask_async_wrapper usage. This was done to pay any setup costs during registration rather than runtime, however this only saved a iscoroutne check. It allows the weirdness of the Blueprint and Scaffold ensure_sync methods to be removed. Switching to runtime ensure_sync usage provides a method for extensions to also support async, as now documented. |
||
|---|---|---|
| .. | ||
| static | ||
| templates | ||
| test_apps | ||
| conftest.py | ||
| test_appctx.py | ||
| test_async.py | ||
| test_basic.py | ||
| test_blueprints.py | ||
| test_cli.py | ||
| test_config.py | ||
| test_converters.py | ||
| test_helpers.py | ||
| test_instance_config.py | ||
| test_json.py | ||
| test_json_tag.py | ||
| test_logging.py | ||
| test_regression.py | ||
| test_reqctx.py | ||
| test_session_interface.py | ||
| test_signals.py | ||
| test_subclassing.py | ||
| test_templating.py | ||
| test_testing.py | ||
| test_user_error_handler.py | ||
| test_views.py | ||