MCPcopy Create free account
hub / github.com/MagicStack/asyncpg / __aenter__

Method __aenter__

asyncpg/pool.py:1179–1183  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1177 self.done = False
1178
1179 async def __aenter__(self):
1180 if self.connection is not None or self.done:
1181 raise exceptions.InterfaceError('a connection is already acquired')
1182 self.connection = await self.pool._acquire(self.timeout)
1183 return self.connection
1184
1185 async def __aexit__(
1186 self,

Callers

nothing calls this directly

Calls 1

_acquireMethod · 0.80

Tested by

no test coverage detected