Consul is a distributed, highly available, and data center aware solution to connect and configure applications across dynamic, distributed infrastructure.
During teardown, consul tries to close the active session but since ClientSession.close is in async function, it has to be awaited in order for the session to be closed.
Reproduction Steps
# script.py
from consul.aio import Consul
client = Consul()
After running this script, you'll run into the following warning:
RuntimeWarning: coroutine 'ClientSession.close' was never awaited
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7fb609145b80>
Overview of the Issue
During teardown, consul tries to close the active session but since
ClientSession.close
is in async function, it has to be awaited in order for the session to be closed.Reproduction Steps
After running this script, you'll run into the following warning: