Message221580
I fixed the first "Task was destroyed but it is pending!" messages when the fix was simple.
Attached dont_log_pending.patch fixes remaining messages when running test_asyncio. I'm not sure yet that this patch is the best approach to fix the issue.
Modified functions with example of related tests:
* BaseEventLoop.run_until_complete(): don't log because there the method already raises an exception if the future didn't complete ("Event loop stopped before Future completed.")
=> related test: test_run_until_complete_stopped() of test_events.py
* wait(): don't log because the caller doesn't have control on the internal sub-tasks, and the task executing wait() will already emit a message if it is destroyed whereas it didn't completed
=> related test: test_wait_errors() of test_tasks.py
* gather(): same rationale than wait()
=> related test: test_one_exception() of test_tasks.py
* test_utils.run_briefly(): the caller doesn't have access to the task and the function is a best effort approach, it doesn't have to guarantee that running a step of the event loop is until to execute all pending callbacks
=> related test: test_baseexception_during_cancel() of test_tasks.py |
|
Date |
User |
Action |
Args |
2014-06-25 22:27:11 | vstinner | set | recipients:
+ vstinner, gvanrossum, pitrou, giampaolo.rodola, python-dev, yselivanov, Guido.van.Rossum, richard.kiss, Richard.Kiss |
2014-06-25 22:27:11 | vstinner | set | messageid: <1403735231.07.0.25845889593.issue21163@psf.upfronthosting.co.za> |
2014-06-25 22:27:11 | vstinner | link | issue21163 messages |
2014-06-25 22:27:10 | vstinner | create | |
|