[issue30773] async generator receives wrong value when shared between coroutines

2019-09-29 Thread Yury Selivanov
Change by Yury Selivanov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue30773] async generator receives wrong value when shared between coroutines

2019-09-29 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset 2f87a7dc5a1ad7f37787f0adee242c931643f878 by Yury Selivanov (Miss Islington (bot)) in branch '3.8': bpo-30773: Fix ag_running; prohibit running athrow/asend/aclose in parallel (GH-7468) (#16486) https://github.com/python/cpython/commit/2f87a7dc5

[issue30773] async generator receives wrong value when shared between coroutines

2019-09-29 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset fc4a044a3c54ce21e9ed150f7d769fb479d34c49 by Yury Selivanov in branch 'master': bpo-30773: Fix ag_running; prohibit running athrow/asend/aclose in parallel (#7468) https://github.com/python/cpython/commit/fc4a044a3c54ce21e9ed150f7d769fb479d34c49

[issue30773] async generator receives wrong value when shared between coroutines

2019-09-29 Thread miss-islington
Change by miss-islington : -- pull_requests: +16072 pull_request: https://github.com/python/cpython/pull/16486 ___ Python tracker ___ __

[issue30773] async generator receives wrong value when shared between coroutines

2018-09-22 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue30773] async generator receives wrong value when shared between coroutines

2018-06-06 Thread Yury Selivanov
Change by Yury Selivanov : -- keywords: +patch pull_requests: +7091 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-l

[issue30773] async generator receives wrong value when shared between coroutines

2018-05-24 Thread Yury Selivanov
Yury Selivanov added the comment: Thanks, I'll look into adding ag_running properly. -- ___ Python tracker ___ ___ Python-bugs-list

[issue30773] async generator receives wrong value when shared between coroutines

2018-05-24 Thread Nathaniel Smith
Nathaniel Smith added the comment: My thoughts: https://bugs.python.org/issue32526#msg309783 -- ___ Python tracker ___ ___ Python-bu

[issue30773] async generator receives wrong value when shared between coroutines

2018-05-24 Thread Yury Selivanov
Change by Yury Selivanov : -- assignee: -> yselivanov components: +Interpreter Core -asyncio priority: normal -> high versions: +Python 3.8 ___ Python tracker ___ _

[issue30773] async generator receives wrong value when shared between coroutines

2018-05-24 Thread Yury Selivanov
Yury Selivanov added the comment: Thanks Jan. Thanks a lot for a short script to reproduce this bug. The actual problem here is that asynchronous generators don't control their 'asend' and 'athrow' coroutines in any way. So if you have two of them iterating *in parallel* they will cause their

[issue30773] async generator receives wrong value when shared between coroutines

2018-05-24 Thread Jan
Jan added the comment: I've reproduced the problem also in 3.7 branch. ``` import asyncio loop = asyncio.get_event_loop() async def consumer(): while True: await asyncio.sleep(0) message = yield print('received', message) async def amain(): agenerator = cons

[issue30773] async generator receives wrong value when shared between coroutines

2017-06-27 Thread Chris Jerdonek
Chris Jerdonek added the comment: Note that the example can be further simplified by replacing user() with: async def send_hello(g): print("sending: hello") await g.asend("hello") Then the output is: sending: hello received hello sending: hello sending: hello received None

[issue30773] async generator receives wrong value when shared between coroutines

2017-06-26 Thread Emily Morehouse
Changes by Emily Morehouse : -- nosy: +emilyemorehouse ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue30773] async generator receives wrong value when shared between coroutines

2017-06-26 Thread Dima Tisnek
Dima Tisnek added the comment: @Yuri, this bug doesn't require `gather`, here's a version with futures and explicit await's instead. It produces same output: ``` import asyncio async def generator(): while True: x = yield 42 print("received", x) await asyncio.sleep

[issue30773] async generator receives wrong value when shared between coroutines

2017-06-26 Thread Dima Tisnek
New submission from Dima Tisnek: MRE ``` import asyncio async def generator(): while True: x = yield 42 print("received", x) await asyncio.sleep(0.1) async def user(name, g): print("sending", name) await g.asend(name) async def helper(): g = generato