[issue26552] Failing ensure_future still creates a Task

2022-01-28 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset a5451c96a14ac0c3ee7cef7b5c52ab1d783ec613 by Kumar Aditya in branch '3.10': bpo-26552: Fixed case where failing `asyncio.ensure_future` did not close the coroutine (#30288) (#31003)

[issue26552] Failing ensure_future still creates a Task

2022-01-28 Thread Kumar Aditya
Change by Kumar Aditya : -- pull_requests: +29185 pull_request: https://github.com/python/cpython/pull/31003 ___ Python tracker ___

[issue26552] Failing ensure_future still creates a Task

2022-01-28 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks Kumar for the fix! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue26552] Failing ensure_future still creates a Task

2022-01-28 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 24cc6411adbfeecd8901f1ea50caa414c908 by Kumar Aditya in branch 'main': bpo-26552: Fixed case where failing `asyncio.ensure_future` did not close the coroutine (#30288)

[issue26552] Failing ensure_future still creates a Task

2022-01-28 Thread Guido van Rossum
Guido van Rossum added the comment: So I just realized that the OP's description is slightly misleading. (Their code is spot on though!) The code does not create an unwaited-for *task*, assuming that "task" refers to the asyncio.Task class. What is created is a *coroutine* object that's

[issue26552] Failing ensure_future still creates a Task

2021-12-29 Thread Kumar Aditya
Change by Kumar Aditya : -- nosy: +kumaraditya303 nosy_count: 5.0 -> 6.0 pull_requests: +28502 pull_request: https://github.com/python/cpython/pull/30288 ___ Python tracker

[issue26552] Failing ensure_future still creates a Task

2021-12-29 Thread Carlos Damázio
Change by Carlos Damázio : -- keywords: +patch nosy: +dmzz nosy_count: 4.0 -> 5.0 pull_requests: +28501 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30287 ___ Python tracker

[issue26552] Failing ensure_future still creates a Task

2021-11-29 Thread Guido van Rossum
Change by Guido van Rossum : -- keywords: +easy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue26552] Failing ensure_future still creates a Task

2021-11-29 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue26552] Failing ensure_future still creates a Task

2021-11-29 Thread Irit Katriel
Irit Katriel added the comment: Reproduced on 3.11. -- nosy: +iritkatriel versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.5 ___ Python tracker ___

[issue26552] Failing ensure_future still creates a Task

2016-03-13 Thread Guido van Rossum
Guido van Rossum added the comment: Sounds like an easy fix. Could you submit a patch? -- ___ Python tracker ___

[issue26552] Failing ensure_future still creates a Task

2016-03-13 Thread Damien Nicolas
New submission from Damien Nicolas: When calling asyncio.ensure_future() on a coroutine, and if the loop is closed, ensure_future() will raise a RuntimeError. However, it still creates a Task, which will generate a RuntimeWarning that we can’t fix since there is no way to cancel the Task.