def _patch_quart_local() -> None: LocalStack.__ident_func__ = lambda _: TaskLocal._task_identity( ) # type: ignore
if handler is None: werkzeug_response = error.get_response() return await self.make_response(( werkzeug_response.get_data(), werkzeug_response.status_code, werkzeug_response.headers, )) else: return await handler(error) else: return await old_handle_http_exception(self, error) Quart.handle_http_exception = new_handle_http_exception # type: ignore Flask = Quart from quart.local import LocalStack, TaskLocal # noqa: E402, I202 LocalStack.__ident_func__ = lambda _: TaskLocal._task_identity() # type: ignore __all__ = ( '_app_ctx_stack', '_request_ctx_stack', 'abort', 'after_this_request', 'appcontext_popped', 'appcontext_pushed', 'appcontext_tearing_down', 'before_render_template', 'Blueprint', 'Config', 'copy_current_request_context', 'current_app', 'escape', 'flash', 'g', 'get_flashed_messages', 'got_request_exception', 'get_template_attribute', 'has_app_context', 'has_request_context', 'jsonify', 'Markup', 'make_response', 'message_flashed', 'Quart', 'redirect', 'render_template', 'render_template_string', 'request', 'request_finished', 'request_started', 'request_tearing_down', 'Request', 'Response', 'ResponseReturnValue', 'safe_join', 'send_file', 'send_from_directory', 'session', 'template_rendered', 'url_for', )