On Wed, May 4, 2016 at 10:06 AM, Markus Holtermann <i...@markusholtermann.eu
> wrote:

> What about having asgiref and daphne as optional dependencies instead of
> hard once and raising a proper exception "please install ..." when the
> import fails?
>
> ```
> try:
>    from asgiref import ...
> except ImportError:
>    raise ImportError(
>        "Please ensure you installed asgiref to use this feature. Do so "
>         "with `pip install Django[channels]"
>    )
> ```
>
> i.e. `pip install "Django[channels]"` ?
>

That is the other option, but it seems to run contrary to Django's
traditional batteries-included philosophy (and would result in some ugly,
ugly import code in the channels modules). I'm curious to hear more
opinions though, if there's support for it I'm happy to change it.

Andrew

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAFwN1ursVi2g%2BFCj1vY5w%3Df6LOtYyxZackEFhinVF3oBD%2BCPvQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to