Re: Django Async DEP
> > We've always considered that implicit queries on attribute access were an > intractable problem. I said it on stage an DjangoCon US 2013. I'm now > wondering if I was wrong all along! In an async ORM context, every time we > traverse a relation, we could create a Future that would execute the query > and resolve to its result. This would require one await per SQL query so > we'd still get the benefit of making queries explicit, although to a lesser > extent than with an explicit select/prefetch_related. > In theory there's nothing stopping you from turning prefetch_related int on explicit fetch_related: queryset = Foo.objects.filter(Foo.publish_date <= datetime.date.today()) queryset = fetch_related(queryset[:10], Foo.author) # with a future results = await queryset.all() fetch_related(results, Foo.category) # with a result set, returns identity -- 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/6c2d073d-fa21-43f2-94aa-db12c0f817da%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Django Async DEP
I have a separate question. Is it possible to get the django 3.0 asgi things into a different package to use with django 2.2? Thanks for the great work. On Friday, May 10, 2019 at 3:42:08 PM UTC+6, Patryk Zawadzki wrote: > > We've always considered that implicit queries on attribute access were an >> intractable problem. I said it on stage an DjangoCon US 2013. I'm now >> wondering if I was wrong all along! In an async ORM context, every time we >> traverse a relation, we could create a Future that would execute the query >> and resolve to its result. This would require one await per SQL query so >> we'd still get the benefit of making queries explicit, although to a lesser >> extent than with an explicit select/prefetch_related. >> > > In theory there's nothing stopping you from turning prefetch_related int > on explicit fetch_related: > > queryset = Foo.objects.filter(Foo.publish_date <= datetime.date.today()) > > queryset = fetch_related(queryset[:10], Foo.author) # with a future > > results = await queryset.all() > > fetch_related(results, Foo.category) # with a result set, returns identity > > -- 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/e738b8a8-89eb-4883-8e59-14647d0ecc17%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Django Async DEP
On Fri, May 10, 2019 at 3:51 AM Asif Saif Uddin wrote: > I have a separate question. Is it possible to get the django 3.0 asgi > things into a different package to use with django 2.2? > > Thanks for the great work. > > Unfortunately not - this is covered a little in the section in the DEP that says why we can't do it in a separate package, but basically, the changes required to Django are too deep to do separately (or even as a long-running fork). 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/CAFwN1uppnH8r_%3Dgk_o%2BuuP%2BpxR7Da6HQzR8%2B%3DmyM3yHkEZcyDw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
DEP 0008 (Formatting using Black) is accepted
Hi everyone, The Technical Board has voted on DEP 0008 ( https://github.com/django/deps/blob/master/accepted/0008-black.rst), after the extensive discussion here and the updates done as a result. The board voted in favour, and so I've moved the DEP into the accepted directory. One of the key changes to the proposal was to wait until Black got to a stable (1.0) release, so it will sit in "accepted" until that happens, at which point we will do the implementation (including the big reformat itself) and then move the DEP to "final". There's no hard timeline on when Black will hit a stable release, but it's very close; there are a few changes we'd like to make sure are included when we reformat Django, such as keeping lists with trailing commas on multiple lines (https://github.com/python/black/pull/826). That's why we're waiting for the stable release rather than reformatting now. Thanks to everyone who chimed in on the discussion - this was not an easy decision, and the feedback helped a lot to work out what was best for us. I also want to personally thank Herman Schistad, for prompting this discussion, and Aymeric Augustin, for his work on writing and updating the DEP! Yours in auto-formatting, 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/CAFwN1uox9b7i895zS0pymzJ-kUQtd_USkQi-%3DbY-q58noo3Mmg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: DEP 0008 (Formatting using Black) is accepted
One quick clarification - when I said "stable (1.0)" release, I in fact meant the first release that the Black project officially marks as stable. Black doesn't use versioning that would result in a stable release being called 1.0, as far as I know, given they are on 19.3b0 right now! Andrew On Friday, May 10, 2019 at 6:46:37 PM UTC-7, Andrew Godwin wrote: > > Hi everyone, > > The Technical Board has voted on DEP 0008 ( > https://github.com/django/deps/blob/master/accepted/0008-black.rst), > after the extensive discussion here and the updates done as a result. > > The board voted in favour, and so I've moved the DEP into the accepted > directory. > > One of the key changes to the proposal was to wait until Black got to a > stable (1.0) release, so it will sit in "accepted" until that happens, at > which point we will do the implementation (including the big reformat > itself) and then move the DEP to "final". > > There's no hard timeline on when Black will hit a stable release, but it's > very close; there are a few changes we'd like to make sure are included > when we reformat Django, such as keeping lists with trailing commas on > multiple lines (https://github.com/python/black/pull/826). That's why > we're waiting for the stable release rather than reformatting now. > > Thanks to everyone who chimed in on the discussion - this was not an easy > decision, and the feedback helped a lot to work out what was best for us. > > I also want to personally thank Herman Schistad, for prompting this > discussion, and Aymeric Augustin, for his work on writing and updating the > DEP! > > Yours in auto-formatting, > 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/c7cd08c4-6d16-4141-b21c-438306a8d458%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.