Issue32684
Created on 2018-01-27 05:38 by socketpair, last changed 2022-04-11 14:58 by admin. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 7209 | merged | yselivanov, 2018-05-29 16:52 | |
| PR 7222 | merged | miss-islington, 2018-05-29 21:21 | |
| PR 7224 | merged | yselivanov, 2018-05-29 21:44 | |
| PR 7225 | merged | yselivanov, 2018-05-29 21:52 | |
| PR 7231 | merged | miss-islington, 2018-05-29 23:22 | |
| Messages (8) | |||
|---|---|---|---|
| msg310843 - (view) | Author: Марк Коренберг (socketpair) * | Date: 2018-01-27 05:38 | |
Proof:
================
import asyncio
async def test():
while True:
print('sleeping 1')
await asyncio.gather(asyncio.sleep(1), return_exceptions=True)
async def amain():
print('creating task')
qwe = asyncio.Task(test())
print('sleeping 2')
await asyncio.sleep(2)
print('cancelling task')
qwe.cancel()
print('waiting task for completion')
try:
await qwe
except Exception as e:
print('task complete: %r', e)
loop = asyncio.get_event_loop()
loop.run_until_complete(amain())
================
This program will never complete.
This case should be either fixed, or documented.
|
|||
| msg310846 - (view) | Author: R. David Murray (r.david.murray) * ![]() |
Date: 2018-01-27 07:04 | |
See also issue 26923, but I think this problem is different. |
|||
| msg318059 - (view) | Author: Yury Selivanov (yselivanov) * ![]() |
Date: 2018-05-29 16:57 | |
Thanks for reporting this. Agree, this is a bug and makes it hard (if not impossible) to use gather. I've created a PR to address the issue. |
|||
| msg318093 - (view) | Author: Yury Selivanov (yselivanov) * ![]() |
Date: 2018-05-29 21:20 | |
New changeset 863b6749093a86810c4077112a857363410cc221 by Yury Selivanov in branch 'master': bpo-32684: Fix gather to propagate cancel of itself with return_exceptions (GH-7209) https://github.com/python/cpython/commit/863b6749093a86810c4077112a857363410cc221 |
|||
| msg318127 - (view) | Author: Yury Selivanov (yselivanov) * ![]() |
Date: 2018-05-29 22:29 | |
New changeset 036434273e6f6905403432c973d98ade1ae58197 by Yury Selivanov (Miss Islington (bot)) in branch '3.7': bpo-32684: Fix gather to propagate cancel of itself with return_exceptions (GH-7209) (#7222) https://github.com/python/cpython/commit/036434273e6f6905403432c973d98ade1ae58197 |
|||
| msg318138 - (view) | Author: Yury Selivanov (yselivanov) * ![]() |
Date: 2018-05-29 23:20 | |
New changeset 3b263e65a80cfcb1fc751834372533773ec024a4 by Yury Selivanov in branch '3.6': bpo-32684: Fix gather to propagate cancel of itself with return_exceptions (GH-7224) https://github.com/python/cpython/commit/3b263e65a80cfcb1fc751834372533773ec024a4 |
|||
| msg318139 - (view) | Author: Yury Selivanov (yselivanov) * ![]() |
Date: 2018-05-29 23:20 | |
New changeset 6f75bae74866b6acf638e3aa610d830d55b7e314 by Yury Selivanov in branch 'master': bpo-32684: Fix nits in tests (GH-7225) https://github.com/python/cpython/commit/6f75bae74866b6acf638e3aa610d830d55b7e314 |
|||
| msg318142 - (view) | Author: Yury Selivanov (yselivanov) * ![]() |
Date: 2018-05-30 00:40 | |
New changeset 3ddee64587482082fcbab930ff82ed67aa9f4a0d by Yury Selivanov (Miss Islington (bot)) in branch '3.7': bpo-32684: Fix nits in tests (GH-7225) (#7231) https://github.com/python/cpython/commit/3ddee64587482082fcbab930ff82ed67aa9f4a0d |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:58:57 | admin | set | github: 76865 |
| 2018-05-30 00:59:24 | yselivanov | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2018-05-30 00:40:59 | yselivanov | set | messages: + msg318142 |
| 2018-05-29 23:22:14 | miss-islington | set | pull_requests: + pull_request6863 |
| 2018-05-29 23:20:28 | yselivanov | set | messages: + msg318139 |
| 2018-05-29 23:20:04 | yselivanov | set | messages: + msg318138 |
| 2018-05-29 22:29:14 | yselivanov | set | messages: + msg318127 |
| 2018-05-29 21:52:43 | yselivanov | set | pull_requests: + pull_request6857 |
| 2018-05-29 21:44:43 | yselivanov | set | pull_requests: + pull_request6856 |
| 2018-05-29 21:21:22 | miss-islington | set | pull_requests: + pull_request6853 |
| 2018-05-29 21:20:11 | yselivanov | set | messages: + msg318093 |
| 2018-05-29 16:57:32 | yselivanov | set | versions: - Python 3.5 |
| 2018-05-29 16:57:20 | yselivanov | set | messages: + msg318059 |
| 2018-05-29 16:52:43 | yselivanov | set | keywords:
+ patch stage: patch review pull_requests: + pull_request6844 |
| 2018-01-27 07:04:29 | r.david.murray | set | nosy:
+ r.david.murray messages: + msg310846 |
| 2018-01-27 05:38:11 | socketpair | create | |
