Skip to content

Commit 8aa5edf

Browse files
committed
Better check
1 parent 5d306ee commit 8aa5edf

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tests/integrations/django/asgi/test_asgi.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,14 @@ async def test_basic(sentry_init, capture_events, application):
3838

3939
events = capture_events()
4040

41-
if sys.version_info < (3, 9):
41+
import channels # type: ignore[import-not-found]
42+
43+
if (
44+
sys.version_info < (3, 9)
45+
and channels.__version__ < "4.0.0"
46+
and django.VERSION >= (3, 0)
47+
and django.VERSION < (4, 0)
48+
):
4249
# We emit a UserWarning for channels 2.x and 3.x on Python 3.8 and older
4350
# because the async support was not really good back then and there is a known issue.
4451
# See the TreadingIntegration for details.

0 commit comments

Comments
 (0)