django / daphne

Django Channels HTTP/WebSocket server
BSD 3-Clause "New" or "Revised" License
2.32k stars 256 forks source link

Move runserver command into Daphne. #428

Closed carltongibson closed 1 year ago

carltongibson commented 1 year ago

As part of Channels 4.0 it would be nice to break the hard dependency on Daphne.

See

Ideally this would be in Django, but asgiref doesn't yet provide a simple server implementation.

So the suggestion would be a separate app.

@massover's comment on the forum thread there:

  1. Add the commands to the daphne repository, perhaps allowing us to add daphne as an installed app so the command is discovered, and reference this in the asgi section of the django documentation.

...I feel like option (4) could make sense as well. This code is specifically tied to daphne. Since daphne is already a project under the django organization, maybe it’s ok to put a command in that package and add as a django app. It’s one fewer separate dependency to install.

As a transitional step, that's probably as easy a way forward as any that have been suggested.

carltongibson commented 1 year ago

Fixed in https://github.com/django/daphne/pull/429.