[issue33413] asyncio.gather should not use special Future

2018-05-10 Thread Ned Deily
Change by Ned Deily : -- components: +asyncio nosy: +asvetlov, yselivanov ___ Python tracker ___

[issue33413] asyncio.gather should not use special Future

2018-05-10 Thread Martin Teichmann
Martin Teichmann added the comment: I looked a bit into the details, and found that bpo-30048 created the described weird behavior. There they fixed the problem that a cancel is ignored if a coroutine manages to cancel its own task and return immediately. As shown

[issue33413] asyncio.gather should not use special Future

2018-05-08 Thread twisteroid ambassador
twisteroid ambassador added the comment: I would like to comment on the last observation about current_task().cancel(). I also ran into this corner case recently. When a task is cancelled from outside, by virtue of there *being something outside doing the

[issue33413] asyncio.gather should not use special Future

2018-05-02 Thread Martin Teichmann
Change by Martin Teichmann : -- keywords: +patch pull_requests: +6388 stage: -> patch review ___ Python tracker ___

[issue33413] asyncio.gather should not use special Future

2018-05-02 Thread Martin Teichmann
New submission from Martin Teichmann : asyncio.gather() returns a _GatheringFuture, which inherits from asyncio.Future. This is weird in current asyncio, as futures are supposed to be created with loop.create_future(). So I tried to reimplement gather() without