[Python-ideas] Add ability to get current event loop within asyncio coroutine

Ilya Kulakov kulakov.ilya at gmail.com
Fri May 20 13:53:53 EDT 2016

> On 20 May 2016, at 12:22, Guido van Rossum <guido at python.org> wrote:
> OK, I finally see the point. There are legitimate situations where
> get_event_loop() returns None (this is how most of asyncio's tests are
> running). 

Unless there are tests that expect that get_event_loop() would return None
when called from within coroutine it should be fine.

> So we want a separate function, e.g.
> get_current_event_loop(). Send a PR to the GitHub project.

Also see related bug: http://bugs.python.org/issue26969 <http://bugs.python.org/issue26969>
Yuri did some work, but he argumented in favor of modifying get_event_loop.

Should we continue discussion of implementation here or in that issue?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20160520/fb29e4f3/attachment.html>

More information about the Python-ideas mailing list