Support prefetch_related() with Queryset.aiterator()
Asynchronously iterating through a QuerySet that contains a prefetch_related definition is not supported in the alpha release of 4.2, but would be a quite useful feature.
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().
Change History
(12)
Triage Stage: |
Unreviewed → Accepted
|
Has patch: |
set
|
Owner: |
changed from nobody to Barry Johnson
|
Status: |
new → assigned
|
Needs tests: |
set
|
Patch needs improvement: |
set
|
Owner: |
changed from Barry Johnson to john-parton
|
Needs tests: |
unset
|
Patch needs improvement: |
unset
|
Needs documentation: |
set
|
Patch needs improvement: |
set
|
Needs documentation: |
unset
|
Patch needs improvement: |
unset
|
Triage Stage: |
Accepted → Ready for checkin
|
Resolution: |
→ fixed
|
Status: |
assigned → closed
|
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.)