Andrew Svetlov <andrew.svet...@gmail.com> added the comment:

Serhiy, maybe I had not understood your proposal properly.

If you are asking about deprecating get_event_loop() call from outside of async 
code but implicit call get_running_loop() without a warning if called from 
async function -- it sounds like a brilliant idea.

Something like:

def get_event_loop():
    current_loop = _get_running_loop()
    if current_loop is not None:
        return current_loop
    warnings.warn("...", DeprecationWarning)  
    return get_event_loop_policy().get_event_loop()

----------

_______________________________________
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