[issue26923] asyncio.gather drops cancellation

2016-06-22 Thread Johannes Ebke
Johannes Ebke added the comment: Attached is a new version of the patch incorporating the review results. -- Added file: http://bugs.python.org/file43508/fix_and_test_26923_reviewed.patch ___ Python tracker <http://bugs.python.org/issue26

[issue26923] asyncio.gather drops cancellation

2016-06-20 Thread Johannes Ebke
Johannes Ebke added the comment: Right, that's neater. Attached is a patch with your version and a test. I checked that it fails with the old version of cancel() and passes with the new one. Concerning possible other bugs, I've had a look in the standard library, but could not fi

[issue26923] asyncio.gather drops cancellation

2016-06-15 Thread Johannes Ebke
Johannes Ebke added the comment: On rereading my original description, it really is not clearly described why the calling Task ends up surviving. Attached is a patch to the 3.5.1 asyncio/tasks.py which adds some print statements in Task.cancel(). If I execute the cancellation_test.py with

[issue26923] asyncio.gather drops cancellation

2016-05-03 Thread Johannes Ebke
Johannes Ebke added the comment: Thank you for providing the relevant documentation link. I just noticed that it should probably be clarified that in case the outer Future is cancelled, and all children that are not already done ignore the cancellation (a.k.a. catch the CancelledError), the

[issue26923] asyncio.gather drops cancellation

2016-05-03 Thread Johannes Ebke
New submission from Johannes Ebke: In a very specific case, asyncio.gather causes a cancel() call on the Task waiting on the _GatheringFuture to return a false positive. An example program demonstrating this is attached. The context: asyncio.gather creates a _GatheringFuture with a list of