Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix aiterator() signature. #262

Merged
merged 1 commit into from
Aug 16, 2024

Conversation

john-parton
Copy link

Queryset.aiterator() was set up to by annotated as async () -> Iterator which implies the call semantics are

for obj in await queryset.aiterator():
    ...

But what we actually want is

async for obj in queryset.aiterator():
   ...

Updated signature to match Django

@john-parton john-parton force-pushed the bugfix/aiterator-async-iterator branch from 547be49 to 99239e3 Compare August 16, 2024 19:53
@john-parton
Copy link
Author

Rebased/force-pushed to avoid warning from CI

@sbdchd
Copy link
Owner

sbdchd commented Aug 16, 2024

Thanks!

@kodiakhq kodiakhq bot merged commit 8a8a805 into sbdchd:main Aug 16, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants