Note that the asyncio docs say that loop.create_future() and loop.create_task() are the preferred ways of creating Future and Task objects, rather than instantiating them directly.
This patch removes the direct instantiation calls in favour of calling those API routines.
Also, I don’t think you should be subclassing Future; leave that sort of thing to event-loop implementations. That would fix the multiple instances of this warning that I get with Python 3.10:
/home/ldo/sources/panoramisk-git/panoramisk/actions.py:34: DeprecationWarning: There is no current event loop
asyncio.Future.__init__(self)
Note that the
asyncio docs
say that loop.create_future()
and loop.create_task()
are the preferred ways of creatingFuture
andTask
objects, rather than instantiating them directly.This patch removes the direct instantiation calls in favour of calling those API routines.
Also, I don’t think you should be subclassing
Future
; leave that sort of thing to event-loop implementations. That would fix the multiple instances of this warning that I get with Python 3.10: