Skip to content

Commit

Permalink
Fix Quart integration for Quart 0.19.4 (#2516)
Browse files Browse the repository at this point in the history
* is_coroutine_function was removed from quart, taking from asyncio directly
  • Loading branch information
antonpirker authored Nov 20, 2023
1 parent b3ccf96 commit 5c17491
Showing 1 changed file with 4 additions and 2 deletions.
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

0 comments on commit 5c17491

Please sign in to comment.