[issue37006] Add top level await statement support for doctest

2021-01-15 Thread Austin "Paco" Rainwater
Change by Austin "Paco" Rainwater : -- nosy: +pacorain ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37006] Add top level await statement support for doctest

2020-04-20 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- nosy: +BTaskaya versions: +Python 3.9 -Python 3.8 ___ Python tracker ___ ___ Python-bugs-list

[issue37006] Add top level await statement support for doctest

2020-04-19 Thread jack1142
Change by jack1142 : -- nosy: +jack1142 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37006] Add top level await statement support for doctest

2019-05-22 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: As a reference, PR from Yuri for an asyncREPL `python -m asyncio` which I believe he want in 3.8: https://github.com/python/cpython/pull/13472 I'm also likely to align IPython behavior on whatever core python decides. --

[issue37006] Add top level await statement support for doctest

2019-05-22 Thread Andrew Svetlov
Andrew Svetlov added the comment: Agree with Nathaniel. There is no need to rush now. -- ___ Python tracker ___ ___

[issue37006] Add top level await statement support for doctest

2019-05-22 Thread Nathaniel Smith
Nathaniel Smith added the comment: As far as things like run/run_until_complete/etc go, I think doctests should have the same semantics as async REPLs, whatever those end up being. Given that we don't actually have mature async REPLs, that the core feature to enable them only landed a few

[issue37006] Add top level await statement support for doctest

2019-05-22 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: The other thing to think about is `ensure_future` and `create_task`, they may not move forward until a foreground task is running. You can keep a loop running between lines or code-chunks, but then doctest cannot contain `asyncio.run()`. I'm leaning

[issue37006] Add top level await statement support for doctest

2019-05-22 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: I tried using AsyncioDocTestRunner that inherits from DocTestRunner and most of the current DocTestRunner is synchronous and the execution happens in __run that seems to cause problem due to name mangling inheriting and changing it. Also python -m

[issue37006] Add top level await statement support for doctest

2019-05-22 Thread Andrew Svetlov
Andrew Svetlov added the comment: Please keep in mind: not only asyncio can be used to execute async/await code. For example, trio has completely different implementation but utilizes async functions as well. Probably we need to customize it, maybe by inheriting AsyncioDocTestRunner from

[issue37006] Add top level await statement support for doctest

2019-05-22 Thread Karthikeyan Singaravelan
New submission from Karthikeyan Singaravelan : Since issue34616 is merged that allows using compile flags to support top level await statements I think it would be good to add support for top level await in doctest. This would help in concise examples in docs where await statements need to