Skip to content

Commit e783af9

Browse files
committed
.
1 parent 3b85ef4 commit e783af9

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

sentry_sdk/integrations/threading.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ def sentry_start(self, *a, **kw):
7878
warnings.warn(
7979
"There is a known issue with Django channels 2.x and 3.x when using Python 3.8 or older. "
8080
"(Async support is emulated using threads and some Sentry data may be leaked between those threads.) "
81-
"Please either upgrade to Django channels 4.x or later, use Django's async features "
82-
"available in Django 3.1 and later, or upgrade to Python 3.9 or later.",
81+
"Please either upgrade to Django channels 4.0+, use Django's async features "
82+
"available in Django 3.1+ instead of Django channels, or upgrade to Python 3.9+.",
8383
stacklevel=2,
8484
)
8585
isolation_scope = sentry_sdk.get_isolation_scope()

tests/integrations/django/asgi/test_asgi.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,17 @@
3131
@pytest.mark.asyncio
3232
@pytest.mark.forked
3333
async def test_basic(sentry_init, capture_events, application):
34-
sentry_init(
35-
integrations=[DjangoIntegration()],
36-
send_default_pii=True,
37-
)
34+
if sys.version_info <= (3, 8):
35+
with pytest.warns(DeprecationWarning):
36+
sentry_init(
37+
integrations=[DjangoIntegration()],
38+
send_default_pii=True,
39+
)
40+
else:
41+
sentry_init(
42+
integrations=[DjangoIntegration()],
43+
send_default_pii=True,
44+
)
3845

3946
events = capture_events()
4047

0 commit comments

Comments
 (0)