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.

Author yselivanov
Recipients Ilya.Kulakov, gvanrossum, r.david.murray, vstinner, yselivanov
Date 2016-05-06.21:00:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
>> Update some places in asyncio where we currently use "get_event_loop()", such as Future constructor, Task.current_task, etc.

> Yury, do you have an idea how it could be done?

I think I do.  To keep the backwards compatibility, we'll need to update the "get_event_loop()" function as follows:

  def get_event_loop():
     loop = _running_loop.loop
     if loop is None:
         loop = get_event_loop_old_impl()
     return loop

No need to actually update Future or Task or any other asyncio code.

The get_running_loop() would look like this:

  def get_running_loop():
     loop = _running_loop.loop
     if loop is None:
         raise RuntimeError('no running event loop')
     return loop
Date User Action Args
2016-05-06 21:00:56yselivanovsetrecipients: + yselivanov, gvanrossum, vstinner, r.david.murray, Ilya.Kulakov
2016-05-06 21:00:56yselivanovsetmessageid: <>
2016-05-06 21:00:56yselivanovlinkissue26969 messages
2016-05-06 21:00:56yselivanovcreate