Skip to content

Fix Quart integration for Quart 0.19.4 #2516

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions sentry_sdk/integrations/quart.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from __future__ import absolute_import

import asyncio
import inspect
import threading

Expand Down Expand Up @@ -45,7 +46,6 @@
request_started,
websocket_started,
)
from quart.utils import is_coroutine_function # type: ignore
except ImportError:
raise DidNotEnable("Quart is not installed")
else:
Expand Down Expand Up @@ -113,7 +113,9 @@ def _sentry_route(*args, **kwargs):
def decorator(old_func):
# type: (Any) -> Any

if inspect.isfunction(old_func) and not is_coroutine_function(old_func):
if inspect.isfunction(old_func) and not asyncio.iscoroutinefunction(
old_func
):

@wraps(old_func)
def _sentry_func(*args, **kwargs):
Expand Down