Min RK <benjami...@gmail.com> added the comment:

The comments in this thread suggest that `set_event_loop` should also be 
deprecated, but it hasn't been. It doesn't seem to have any use without 
`get_event_loop()`.

I'm trying to understand the consequences of these changes for IPython, and 
make the changes intended by asyncio folks, but am not quite clear, yet.

If I understand it correctly, this means that the whole concept of a 'current' 
event loop is deprecated while no event loop is running?

My interpretation of these changes is that it means any persistent handles on 
any event loop while it isn't running is fully the responsibility of individual 
libraries (e.g. tornado, IPython).

This is coming up in IPython where we need a handle on the event loop and 
advance it with `run_until_complete` for each iteration (it should be the same 
loop to maintain persistent state across advances, so `asyncio.run()` would not 
be appropriate). We previously relied on `get_event_loop` to manage this 
handle, but I think we have to now shift to tracking our own handle, and can no 
longer rely on standard APIs to track a shared instance across packages.

----------
nosy: +minrk

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue39529>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to