If the iterator is chunked, related objects could be prefetched in a
manner much like within QuerySet.iterator(), as long as the call to
prefetch_related_objects is wrapped by sync_to_async().
--
Ticket URL: <https://code.djangoproject.com/ticket/34331>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/34331#comment:1>
* owner: nobody => Barry Johnson
* status: new => assigned
* has_patch: 0 => 1
Comment:
Added PR https://github.com/django/django/pull/16543
(There are two commits -- the second one simply changes the order of an
import statement. This GitHub newbie has been unable to find the "Squash
and Merge" button anywhere on the GitHub user interface, nor find any
documentation that says how to reach that button.)
--
Ticket URL: <https://code.djangoproject.com/ticket/34331#comment:2>
* needs_better_patch: 0 => 1
* needs_tests: 0 => 1
Comment:
Thanks for the patch, I left some comments about on the PR.
--
Ticket URL: <https://code.djangoproject.com/ticket/34331#comment:3>
* owner: Barry Johnson => john-parton
--
Ticket URL: <https://code.djangoproject.com/ticket/34331#comment:4>
Comment (by john-parton):
Open pull request here https://github.com/django/django/pull/17118
I have one basic test and the minimal change to documentation there.
--
Ticket URL: <https://code.djangoproject.com/ticket/34331#comment:5>
* needs_better_patch: 1 => 0
* needs_tests: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/34331#comment:6>
* needs_better_patch: 0 => 1
* needs_docs: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/34331#comment:7>
Comment (by john-parton):
Updated my pull request
--
Ticket URL: <https://code.djangoproject.com/ticket/34331#comment:8>
* needs_better_patch: 1 => 0
* stage: Accepted => Ready for checkin
* needs_docs: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/34331#comment:9>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"fff14736f1cc594f79ea0e2656b8375d837b7aca" fff1473]:
{{{
#!CommitTicketReference repository=""
revision="fff14736f1cc594f79ea0e2656b8375d837b7aca"
Fixed #34331 -- Added QuerySet.aiterator() support for prefetch_related().
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/34331#comment:10>