This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2015年12月16日 21:51 by yselivanov, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| Issue25888.patch | yselivanov, 2015年12月17日 21:24 | review | ||
| Messages (7) | |||
|---|---|---|---|
| msg256539 - (view) | Author: Yury Selivanov (yselivanov) * (Python committer) | Date: 2015年12月16日 21:51 | |
This problem was discussed in one of the asyncio issues here: https://github.com/python/asyncio/issues/288 I propose to raise a RuntimeError if an 'await' expression is used for a coroutine object that's being awaited on already. This change shouldn't impact performance in any way. It will prevent users from writing code that behaves in a very weird ways (see the github link for an example). |
|||
| msg256565 - (view) | Author: Guido van Rossum (gvanrossum) * (Python committer) | Date: 2015年12月16日 23:42 | |
Right. |
|||
| msg256615 - (view) | Author: Yury Selivanov (yselivanov) * (Python committer) | Date: 2015年12月17日 21:24 | |
The patch is attached, please review. |
|||
| msg258043 - (view) | Author: Yury Selivanov (yselivanov) * (Python committer) | Date: 2016年01月12日 00:07 | |
Will commit this patch tomorrow to 3.5 and 3.6.
It only affects coroutines (async defs): if an await expression is used on a coroutine object while it's being already awaited by another coroutine, a `RuntimeError("coroutine is being awaited already")` will be triggered.
|
|||
| msg258046 - (view) | Author: Martin Panter (martin.panter) * (Python committer) | Date: 2016年01月12日 01:07 | |
Missing word in a comment on the review |
|||
| msg261125 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2016年03月02日 16:31 | |
New changeset e16084e07761 by Yury Selivanov in branch '3.5': coroutines: Error when awaiting on coroutine that's being awaited https://hg.python.org/cpython/rev/e16084e07761 New changeset 2218ce5c592f by Yury Selivanov in branch 'default': Merge 3.5 (issue #25888) https://hg.python.org/cpython/rev/2218ce5c592f |
|||
| msg261126 - (view) | Author: Yury Selivanov (yselivanov) * (Python committer) | Date: 2016年03月02日 16:33 | |
Committed. Thanks for the review, Martin! |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:25 | admin | set | github: 70076 |
| 2016年03月02日 16:33:32 | yselivanov | set | status: open -> closed resolution: fixed messages: + msg261126 stage: patch review -> resolved |
| 2016年03月02日 16:31:43 | python-dev | set | nosy:
+ python-dev messages: + msg261125 |
| 2016年01月12日 01:07:28 | martin.panter | set | nosy:
+ martin.panter messages: + msg258046 |
| 2016年01月12日 00:07:49 | yselivanov | set | messages: + msg258043 |
| 2015年12月17日 21:24:01 | yselivanov | set | files:
+ Issue25888.patch keywords: + patch messages: + msg256615 stage: patch review |
| 2015年12月17日 17:33:31 | brett.cannon | set | nosy:
+ brett.cannon |
| 2015年12月16日 23:42:35 | gvanrossum | set | messages: + msg256565 |
| 2015年12月16日 21:51:12 | yselivanov | create | |