[issue37172] Odd error awaiting a Future

2019-06-10 Thread Dima Tisnek
Dima Tisnek added the comment: Yes, I think that would be sufficient! I don't know about implementation though, as there's some magic in the way Future.__await__ tries to guess how it was called. I hope one day that magic could go away, but I neither understand the origin nor the mechanics

[issue37172] Odd error awaiting a Future

2019-06-10 Thread Andrew Svetlov
Andrew Svetlov added the comment: Agree, it would be fine. So the behavior is not changed but the error text should be clear, right? -- ___ Python tracker ___

[issue37172] Odd error awaiting a Future

2019-06-10 Thread Dima Tisnek
Dima Tisnek added the comment: I think that if a Future is abused, the following two should return *same* error: async def test(): await asyncio.gather(reader(), writer()) -vs- async def test(): await asyncio.gather(reader(), reader(), writer()) --

[issue37172] Odd error awaiting a Future

2019-06-10 Thread Andrew Svetlov
Andrew Svetlov added the comment: Not sure what "idempotency fix" means in the context of Future objects. Could you describe desired behavior or, even better, provide a pull request that demonstrates your desire? -- ___ Python tracker

[issue37172] Odd error awaiting a Future

2019-06-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: OK. I am quitting here because asyncio and futures are outside my expertise. -- ___ Python tracker ___

[issue37172] Odd error awaiting a Future

2019-06-09 Thread Terry J. Reedy
Change by Terry J. Reedy : -- nosy: -terry.reedy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37172] Odd error awaiting a Future

2019-06-09 Thread Dima Tisnek
Dima Tisnek added the comment: Hi Terry, Yes, I have a specific suggestion: The error `RuntimeError: await wasn't used with future` is misleading. I'm not sure if changing error text is enough. I think that Future.__await__ should be fixed; I think that `await f` should be idempotent, that

[issue37172] Odd error awaiting a Future

2019-06-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: Dima, unless you want to make a specific doc change suggestion, I think this should be closed. The planned code changes will be on other issues. -- nosy: +terry.reedy ___ Python tracker

[issue37172] Odd error awaiting a Future

2019-06-07 Thread Terry J. Reedy
Change by Terry J. Reedy : -- title: Odd error awating a Future -> Odd error awaiting a Future versions: +Python 3.9 ___ Python tracker ___