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 issue with async's do_map which wasn't awaiting any func's that are coroutines #913

merged 1 commit into from Feb 18, 2019


Copy link

seaders commented Oct 17, 2018

While working on the async version of a new applymacro filter, I noticed an underlying issue with map, applying other async filters. In its iteration, it needed to check whether the return value is a coroutine, and if so wait for it.

The added test, test_map_sum passes when in non-async mode, but without this fix, fails in the async tests.


This comment has been minimized.

Copy link

mitsuhiko commented Feb 17, 2019

I suppose the better fix would be to use auto_await which internally uses coroutine.isawaitable which is how the compiler makes a similar decision.

@seaders seaders force-pushed the seaders:do_map_async_fix branch from cf251d1 to 78de0db Feb 18, 2019

This comment has been minimized.

Copy link
Contributor Author

seaders commented Feb 18, 2019

@mitsuhiko changed to use that (when I PR'd this initially, I wasn't even aware that that function was in the project).

…re actually coroutines.
@seaders seaders force-pushed the seaders:do_map_async_fix branch from 78de0db to 059b964 Feb 18, 2019
@mitsuhiko mitsuhiko merged commit 2b23cca into pallets:master Feb 18, 2019
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
@seaders seaders mentioned this pull request Oct 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.