> > I am also not a fan of the approach, but I did err towards being explicit. > Jannis suggested what I think might be a nicer approach on Twitter, which > is to add an async "proxy object" to access methods with, e.g.: > > cache.get("foo") > cache.async.get("foo") > > This is still explicit but looks less ugly, and gives us a way in future > to make some modules transition to async-by-default (by e.g. supplying > cache.sync.get). What do you think? >
I think I'd personally prefer to have to do `from django.asyncore.cache import cache` and if the synchronous cache raised an exception when attempting to use it with an event loop active. Like Aymeric, I don't see myself mixing async and sync code within one module. -- 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/d2c879cb-fad7-4e56-a1d9-1a31d5134e96%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.