-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
web._cancel_all_tasks causes spurious errors on Python <3.7 #3497
Comments
Thanks for the report. |
Merged
asvetlov
added a commit
that referenced
this issue
Jan 8, 2019
* Fix #3497: Ignore done tasks when cancels pending activities on web.run_app finalization.
asvetlov
added a commit
that referenced
this issue
Jan 8, 2019
* Fix #3497: Ignore done tasks when cancels pending activities on web.run_app finalization. (cherry picked from commit 4e99e81) Co-authored-by: Andrew Svetlov <[email protected]>
asvetlov
added a commit
that referenced
this issue
Jan 8, 2019
* Fix #3497: Ignore done tasks when cancels pending activities on web.run_app finalization. (cherry picked from commit 4e99e81) Co-authored-by: Andrew Svetlov <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Long story short
Python 3.5's
asyncio.Task.all_tasks
differs from Python 3.7'sasyncio.all_tasks
in that it includes completed tasks. However, theall_tasks
helper uses them interchangeably.This means that when you shutdown a server started with
web.run_app
on Python 3.5 or 3.6, failed requests are rethrown as exceptions inweb._cancel_all_tasks
, whether they were handled or not.Steps to reproduce
python3.5 -c 'from aiohttp import web; web.run_app(web.Application())'
Expected behaviour
Actual behaviour
The text was updated successfully, but these errors were encountered: