Since aiohttp 2.3 ClientSession.close() is a coroutine and the Bot.__del__() resuled in error.
/usr/lib/python3.6/site-packages/aiotg/bot.py:519: RuntimeWarning: coroutine 'ClientSession.close' was never awaited
self._session.close()
On the way I notised an error after interrupting the bot.run() call.
ERROR:asyncio:Task was destroyed but it is pending!
task: <Task pending coro=<Bot._api_call() running at /home/dmitrygalkin/Projects/github/aiotg/aiotg/bot.py:354> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x7f88907f8828>()]> cb=[<TaskWakeupMethWrapper object at 0x7f88907f8738>()]>
Since aiohttp 2.3
ClientSession.close()
is a coroutine and theBot.__del__()
resuled in error.On the way I notised an error after interrupting the
bot.run()
call.