Skip to content

Commit

Permalink
Support Quart 0.19 onwards
Browse files Browse the repository at this point in the history
Quart 0.19 is based on Flask and hence no longer has a Scaffold class,
instead Flask's should be used.
  • Loading branch information
pgjones committed Oct 2, 2023
1 parent afc488d commit 0f31135
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion sentry_sdk/integrations/quart.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
request,
websocket,
)
from quart.scaffold import Scaffold # type: ignore
from quart.signals import ( # type: ignore
got_background_exception,
got_request_exception,
Expand All @@ -49,6 +48,12 @@
from quart.utils import is_coroutine_function # type: ignore
except ImportError:
raise DidNotEnable("Quart is not installed")
else:
# Quart 0.19 is based on Flask and hence no longer has a Scaffold
try:
from quart.scaffold import Scaffold # type: ignore
except ImportError:
from flask.sansio.scaffold import Scaffold # type: ignore

Check warning on line 56 in sentry_sdk/integrations/quart.py

View check run for this annotation

Codecov / codecov/patch

sentry_sdk/integrations/quart.py#L55-L56

Added lines #L55 - L56 were not covered by tests

TRANSACTION_STYLE_VALUES = ("endpoint", "url")

Expand Down

0 comments on commit 0f31135

Please sign in to comment.