Recent version of channels doesn't support ASGI3
See original GitHub issueSince the recent version of daphne (2.3.0
) added support for ASGI3, I no longer can’t use channels (2.2.0
).
https://github.com/django/daphne/blob/master/daphne/cli.py#L30
Here it would likely to call channel’s router ( ProtocolTypeRouter) with additional two parameters (send
, receive
) which by now (https://github.com/django/channels/blob/2486738765064525cd8ee39294c44600140476ac/channels/routing.py#L56) is not supported.
Can we have support for ASGI3?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:7
- Comments:15 (10 by maintainers)
Top Results From Across the Web
3.0.0 Release Notes — Channels 4.0.0 documentation
The Channels 3 update brings Channels into line with Django's own async ASGI support, introduced with Django 3.0. Channels now integrates with Django's ......
Read more >ASGI_APPLICATION not working with Django Channels
settings' Starting ASGI/Channels version 3.0.5 development server at http://127.0.0.1:8000/ Quit the server with CONTROL ...
Read more >Channels Documentation - Read the Docs
This tutorial is written for Channels 4.0, which supports Python 3.7+ and Django 3.2+. If the Channels version does not match, you can...
Read more >Uvicorn
Uvicorn currently supports HTTP/1.1 and WebSockets. ... Not valid with --reload. ... Channels is a little different to other ASGI frameworks in that...
Read more >channels Changelog - pyup.io
Fixes a bug in Channels 3.0 where ``StaticFilesWrapper`` was not updated to the ASGI 3 ... Updated to ASGI v3, and added support...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
N.B. you should be able to wrap Channels ASGI 2 apps with
asgiref.compatibility.guarantee_single_callable
- https://github.com/django/asgiref/blob/master/asgiref/compatibility.py#L39 - to convert it to ASGI 3.As for now, I just created subclass of
ProtocolTypeRouter
like below to support ASGI3.