triopg icon indicating copy to clipboard operation
triopg copied to clipboard

ConnectionProxy doesn't detach conn when leaving async context

Open touilleMan opened this issue 2 years ago • 0 comments

Originally reported by @vxgmichel

connection pool's acquire context manager returns a connection proxy object that can still be used after we have left the context manager (instead of raising an error)

This is because the triopg version of the connection proxy is missing an additional cleanup routine compared to what is done in asyncpg: https://github.com/MagicStack/asyncpg/blob/7cb4e70d88d165273997d914280c6d109fbbc8f6/asyncpg/pool.py#L78-L84

touilleMan avatar Sep 14 '23 11:09 touilleMan