Since the AsynchronousTask.wait() method is prone to event loop recursion, deprecate it, and add an async_wait() method method to replace it. Instead of using task.wait() in order to implicitly run the event loop, now loop.run_until_complete(task.async_wait()) will be used to explicitly run the event loop. This explicit approach will make it more obvious when code will trigger event loop recursion which would not be compatible with asyncio's default event loop.
Bug: https://bugs.gentoo.org/653856 Zac Medico (2): AsynchronousTask: add scheduler attribute (bug 653856) AsynchronousTask: add async_wait() method (bug 653856) pym/_emerge/AbstractPollTask.py | 3 +-- pym/_emerge/AsynchronousLock.py | 2 +- pym/_emerge/AsynchronousTask.py | 25 ++++++++++++++++++++++++- pym/_emerge/CompositeTask.py | 2 +- pym/portage/tests/ebuild/test_ipc_daemon.py | 2 +- pym/portage/util/SlotObject.py | 9 ++++++++- pym/portage/util/_async/AsyncScheduler.py | 7 +++++++ pym/portage/util/_async/AsyncTaskFuture.py | 2 +- 8 files changed, 44 insertions(+), 8 deletions(-) -- 2.13.6